Class: Slim::Command Private
- Inherits:
-
Object
- Object
- Slim::Command
- Defined in:
- lib/slim/command.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Slim commandline interface
Instance Method Summary collapse
-
#initialize(args) ⇒ Command
constructor
private
A new instance of Command.
-
#run ⇒ Object
private
Run command.
Constructor Details
#initialize(args) ⇒ Command
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Command.
11 12 13 14 |
# File 'lib/slim/command.rb', line 11 def initialize(args) @args = args @options = {} end |
Instance Method Details
#run ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Run command
17 18 19 20 21 |
# File 'lib/slim/command.rb', line 17 def run @opts = OptionParser.new(&method(:set_opts)) @opts.parse!(@args) process end |