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.



213
214
215
# File 'lib/gherkin/formatter/model.rb', line 213

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.



211
212
213
# File 'lib/gherkin/formatter/model.rb', line 211

def duration
  @duration
end

#error_messageObject (readonly)

Returns the value of attribute error_message.



211
212
213
# File 'lib/gherkin/formatter/model.rb', line 211

def error_message
  @error_message
end

#statusObject (readonly)

Returns the value of attribute status.



211
212
213
# File 'lib/gherkin/formatter/model.rb', line 211

def status
  @status
end

Instance Method Details

#replay(formatter) ⇒ Object



217
218
219
# File 'lib/gherkin/formatter/model.rb', line 217

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