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



10
11
12
13
# File 'lib/slim/command.rb', line 10

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



16
17
18
19
20
# File 'lib/slim/command.rb', line 16

def run
  @opts = OptionParser.new(&method(:set_opts))
  @opts.parse!(@args)
  process
end