Module: Scriptster
- Defined in:
- lib/scriptster.rb,
lib/scriptster/logger.rb,
lib/scriptster/version.rb,
lib/scriptster/shellcmd.rb,
lib/scriptster/configuration.rb more...
Overview
The public interface of scriptster is simple. It consists of two functions, cmd and log. The module can be used directly or included in your class.
Defined Under Namespace
Modules: ColourThemes, Logger Classes: Configuration, ShellCmd
Constant Summary collapse
- VERSION =
The version of this library
"0.2.0"
Class Method Summary collapse
-
.cmd(*args) ⇒ Object
Execute a shell command.
-
.configure {|c| ... } ⇒ Object
Use this method to reconfigure the library.
-
.log(*args) ⇒ Object
Pass a message to the logger.
Instance Method Summary collapse
-
#cmd(*args) ⇒ Object
The same as Scriptster.cmd.
-
#log(*args) ⇒ Object
The same as Scriptster.log.
Class Method Details
permalink .cmd(*args) ⇒ Object
Execute a shell command
49 50 51 |
# File 'lib/scriptster.rb', line 49 def self.cmd(*args) ShellCmd.new *args end |
permalink .configure {|c| ... } ⇒ Object
Use this method to reconfigure the library.
71 72 73 74 75 |
# File 'lib/scriptster.rb', line 71 def self.configure c = Configuration.new yield c c.apply end |
permalink .log(*args) ⇒ Object
Pass a message to the logger.
35 36 37 |
# File 'lib/scriptster.rb', line 35 def self.log(*args) Logger::log *args end |
Instance Method Details
permalink #cmd(*args) ⇒ Object
The same as cmd.
56 57 58 |
# File 'lib/scriptster.rb', line 56 def cmd(*args) self.cmd *args end |
permalink #log(*args) ⇒ Object
The same as log.
42 43 44 |
# File 'lib/scriptster.rb', line 42 def log(*args) self.log *args end |