Class: Rbdock::Command
- Inherits:
-
Object
- Object
- Rbdock::Command
- Defined in:
- lib/rbdock/command.rb,
lib/rbdock/command/options.rb
Defined Under Namespace
Modules: Options
Class Method Summary collapse
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(argv) ⇒ Command
constructor
A new instance of Command.
Constructor Details
#initialize(argv) ⇒ Command
Returns a new instance of Command.
10 11 12 13 |
# File 'lib/rbdock/command.rb', line 10 def initialize argv @logger = Log4r::Logger.new("rbdock::command") @argv = argv end |
Class Method Details
.run(argv) ⇒ Object
6 7 8 |
# File 'lib/rbdock/command.rb', line 6 def self.run argv new(argv).execute end |
Instance Method Details
#execute ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/rbdock/command.rb', line 15 def execute = Options.parse!(@argv) if [:app] [:app_path] = Rbdock.clone_app_to_local([:app]) end Rbdock::Generate.run() rescue => e abort "Error: #{e.message}" end |