Module: Integra
- Defined in:
- lib/integra.rb,
lib/integra/config.rb,
lib/integra/logger.rb,
lib/integra/version.rb,
lib/integra/commands.rb
Defined Under Namespace
Modules: Commands, Drivers Classes: Config, Logger
Constant Summary collapse
- NAME =
'integra'
- VERSION =
"0.0.4"
Class Attribute Summary collapse
-
.config ⇒ Object
Returns the value of attribute config.
-
.logger ⇒ Object
Returns the value of attribute logger.
Class Method Summary collapse
- .command!(options = {}) ⇒ Object
-
.gem_libdir ⇒ Object
Return a directory with the project libraries.
Class Attribute Details
.config ⇒ Object
Returns the value of attribute config.
11 12 13 |
# File 'lib/integra.rb', line 11 def config @config end |
.logger ⇒ Object
Returns the value of attribute logger.
11 12 13 |
# File 'lib/integra.rb', line 11 def logger @logger end |
Class Method Details
.command!(options = {}) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/integra.rb', line 14 def self.command!(={}) @logger = Logger.new @config = Config.new() # # When user enters with a path or file as argument, just run it. # unless Commands.respond_to?([:command]) [:args] << [:command] [:command] = :run end Commands.send([:command], ) end |
.gem_libdir ⇒ Object
Return a directory with the project libraries.
30 31 32 33 34 35 |
# File 'lib/integra.rb', line 30 def self.gem_libdir t = ["#{File.dirname(File.($0))}/../lib/#{Integra::NAME}", "#{Gem.dir}/gems/#{Integra::NAME}-#{Integra::VERSION}/lib/#{Integra::NAME}"] t.each {|i| return i if File.readable?(i) } raise "both paths are invalid: #{t}" end |