Class: Gherkin::Formatter::Model::Result

Inherits:
Hashable
  • Object
show all
Defined in:
lib/gherkin/formatter/model.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Hashable

#to_hash

Constructor Details

#initialize(status, duration, error_message) ⇒ Result

Returns a new instance of Result.



226
227
228
# File 'lib/gherkin/formatter/model.rb', line 226

def initialize(status, duration, error_message)
  @status, @duration, @error_message = status, duration, error_message
end

Instance Attribute Details

#durationObject (readonly)

Returns the value of attribute duration.



224
225
226
# File 'lib/gherkin/formatter/model.rb', line 224

def duration
  @duration
end

#error_messageObject (readonly)

Returns the value of attribute error_message.



224
225
226
# File 'lib/gherkin/formatter/model.rb', line 224

def error_message
  @error_message
end

#statusObject (readonly)

Returns the value of attribute status.



224
225
226
# File 'lib/gherkin/formatter/model.rb', line 224

def status
  @status
end

Instance Method Details

#replay(formatter) ⇒ Object



230
231
232
# File 'lib/gherkin/formatter/model.rb', line 230

def replay(formatter)
  formatter.result(self)
end