Module: Cucumber::Ast::HasLocation

Included in:
Background, Examples, Feature, Scenario, ScenarioOutline, Step
Defined in:
lib/cucumber/ast/location.rb

Instance Method Summary collapse

Instance Method Details

#fileObject


26
27
28
# File 'lib/cucumber/ast/location.rb', line 26

def file
  location.file
end

#file_colon_lineObject


22
23
24
# File 'lib/cucumber/ast/location.rb', line 22

def file_colon_line
  location.to_s
end

#lineObject


30
31
32
# File 'lib/cucumber/ast/location.rb', line 30

def line
  location.line
end

#locationObject


34
35
36
37
38
# File 'lib/cucumber/ast/location.rb', line 34

def location
  raise('Please set @location in the constructor') unless @location
  raise("@location must be an Ast::Location but is a #{@location.class}") unless @location.is_a?(Location)
  @location
end