Class: Lite::Command::Step

Inherits:
Object
  • Object
show all
Defined in:
lib/lite/command/step.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(command, options) ⇒ Step

Returns a new instance of Step.



9
10
11
12
# File 'lib/lite/command/step.rb', line 9

def initialize(command, options)
  @command = command
  @options = options
end

Instance Attribute Details

#commandObject (readonly)

Returns the value of attribute command.



7
8
9
# File 'lib/lite/command/step.rb', line 7

def command
  @command
end

#optionsObject (readonly)

Returns the value of attribute options.



7
8
9
# File 'lib/lite/command/step.rb', line 7

def options
  @options
end

Instance Method Details

#run?(cmd) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/lite/command/step.rb', line 14

def run?(cmd)
  Utils.evaluate(cmd, options)
end