Class: Slim::Command Private

Inherits:
Object
  • Object
show all
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

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

#runObject

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