Class: Postview::CLI::ServerCommand
- Inherits:
-
Object
- Object
- Postview::CLI::ServerCommand
- Includes:
- Command
- Defined in:
- lib/postview/cli/server_command.rb
Overview
Copying © 2009 Hallison Batista
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(path, arguments) ⇒ ServerCommand
constructor
A new instance of ServerCommand.
- #run ⇒ Object
Methods included from Command
#hidden_prompt, #init, #prompt, #start, #step
Constructor Details
#initialize(path, arguments) ⇒ ServerCommand
Returns a new instance of ServerCommand.
14 15 16 17 |
# File 'lib/postview/cli/server_command.rb', line 14 def initialize(path, arguments) @path, @arguments, @options = path, arguments, {} @server_options = {} end |
Class Method Details
.run(args) ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/postview/cli/server_command.rb', line 25 def self.run(args) if args.first =~ /^\w.*|^\/\w.*/ new(args.shift, args.).run else new(".", args.).run end end |
Instance Method Details
#run ⇒ Object
19 20 21 22 23 |
# File 'lib/postview/cli/server_command.rb', line 19 def run parse_arguments load_server start_server end |