Class: IOCheck::Test::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/iocheck/test.rb

Defined Under Namespace

Classes: Actual

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cmd) ⇒ Command

Returns a new instance of Command.



141
142
143
144
# File 'lib/iocheck/test.rb', line 141

def initialize(cmd)
  @cmd = cmd
  @actual = Actual.new
end

Instance Attribute Details

#actualObject (readonly)

Returns the value of attribute actual.



145
146
147
# File 'lib/iocheck/test.rb', line 145

def actual
  @actual
end

#cmdObject (readonly)

Returns the value of attribute cmd.



145
146
147
# File 'lib/iocheck/test.rb', line 145

def cmd
  @cmd
end

Instance Method Details

#run!(repeat) ⇒ Object



147
148
149
150
151
152
# File 'lib/iocheck/test.rb', line 147

def run!(repeat)
  repeat.times do 
    @actual << Actual::Result.new( @cmd )
  end
  @actual.repeat  = repeat
end