Class: Cucumber::Formatter::LegacyApi::Ast::Scenario

Inherits:
Struct
  • Object
show all
Defined in:
lib/cucumber/formatter/legacy_api/ast.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#locationObject

Returns the value of attribute location


288
289
290
# File 'lib/cucumber/formatter/legacy_api/ast.rb', line 288

def location
  @location
end

#nameObject

Returns the value of attribute name


288
289
290
# File 'lib/cucumber/formatter/legacy_api/ast.rb', line 288

def name
  @name
end

#statusObject

Returns the value of attribute status


288
289
290
# File 'lib/cucumber/formatter/legacy_api/ast.rb', line 288

def status
  @status
end

Instance Method Details

#backtrace_line(step_name = name.to_s, line = self.location.line) ⇒ Object


289
290
291
# File 'lib/cucumber/formatter/legacy_api/ast.rb', line 289

def backtrace_line(step_name = name.to_s, line = self.location.line)
  "#{location.on_line(line)}:in `#{step_name}'"
end

#failed?Boolean


293
294
295
# File 'lib/cucumber/formatter/legacy_api/ast.rb', line 293

def failed?
  :failed == status
end

#lineObject


297
298
299
# File 'lib/cucumber/formatter/legacy_api/ast.rb', line 297

def line
  location.line
end