Class: Guard::Rack::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/guard/rack/command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Command

Returns a new instance of Command.



8
9
10
# File 'lib/guard/rack/command.rb', line 8

def initialize(options = {})
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/guard/rack/command.rb', line 6

def options
  @options
end

Instance Method Details

#buildObject



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/guard/rack/command.rb', line 12

def build
  cmd = [options[:cmd]]

  cmd << configuration
  cmd << environment
  cmd << host
  cmd << port
  cmd << daemon
  cmd << debug
  cmd << server

  cmd.flatten.compact
end