Class: Postview::CLI::CreateCommand
- Inherits:
-
Object
- Object
- Postview::CLI::CreateCommand
- Includes:
- Command
- Defined in:
- lib/postview/cli/create_command.rb
Overview
Copying © 2009 Hallison Batista
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(path, arguments) ⇒ CreateCommand
constructor
A new instance of CreateCommand.
- #run ⇒ Object
Methods included from Command
#hidden_prompt, #init, #prompt, #start, #step
Constructor Details
#initialize(path, arguments) ⇒ CreateCommand
Returns a new instance of CreateCommand.
10 11 12 |
# File 'lib/postview/cli/create_command.rb', line 10 def initialize(path, arguments) @path, @arguments, @options = path, arguments, {} end |
Class Method Details
.run(args) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/postview/cli/create_command.rb', line 20 def self.run args if args.first =~ /^\w.*|^\/\w.*/ new(args.shift, args.).run else new(nil, args.).run end end |
Instance Method Details
#run ⇒ Object
14 15 16 17 18 |
# File 'lib/postview/cli/create_command.rb', line 14 def run parse_arguments load_default_settings build_settings end |