Class: Disloku::BaseCommand
- Inherits:
-
Object
- Object
- Disloku::BaseCommand
- Defined in:
- lib/disloku/BaseCommand.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#options ⇒ Object
Returns the value of attribute options.
-
#repository ⇒ Object
Returns the value of attribute repository.
Instance Method Summary collapse
-
#initialize(cliOptions) ⇒ BaseCommand
constructor
A new instance of BaseCommand.
- #processGlobalOptions(cliOptions) ⇒ Object
Constructor Details
#initialize(cliOptions) ⇒ BaseCommand
Returns a new instance of BaseCommand.
9 10 11 |
# File 'lib/disloku/BaseCommand.rb', line 9 def initialize(cliOptions) processGlobalOptions(cliOptions) end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
7 8 9 |
# File 'lib/disloku/BaseCommand.rb', line 7 def config @config end |
#options ⇒ Object
Returns the value of attribute options.
7 8 9 |
# File 'lib/disloku/BaseCommand.rb', line 7 def @options end |
#repository ⇒ Object
Returns the value of attribute repository.
7 8 9 |
# File 'lib/disloku/BaseCommand.rb', line 7 def repository @repository end |
Instance Method Details
#processGlobalOptions(cliOptions) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/disloku/BaseCommand.rb', line 13 def processGlobalOptions(cliOptions) if (cliOptions[:scm].nil? || cliOptions[:scm] == "git") @scmImplementation = Git::Repository end if (cliOptions[:debug]) Log.instance.level(:default, Logger::DEBUG) elsif (cliOptions[:verbose]) Log.instance.level(:default, Logger::INFO) else Log.instance.level(:default, Logger::WARN) end end |