module Cucumber::Core::Ast::HasLocation

Public Instance Methods

all_locations() click to toggle source
# File lib/cucumber/core/ast/location.rb, line 157
def all_locations
  @all_locations ||= Location.merge([location] + attributes.map { |node| node.all_locations }.flatten)
end
attributes() click to toggle source
# File lib/cucumber/core/ast/location.rb, line 161
def attributes
  [tags, comments, multiline_arg].flatten
end
comments() click to toggle source
# File lib/cucumber/core/ast/location.rb, line 170
def comments
  # will be overriden by nodes that actually have comments
  []
end
file() click to toggle source
# File lib/cucumber/core/ast/location.rb, line 144
def file
  location.file
end
file_colon_line() click to toggle source
# File lib/cucumber/core/ast/location.rb, line 140
def file_colon_line
  location.to_s
end
location() click to toggle source
# File lib/cucumber/core/ast/location.rb, line 152
def location
  raise('Please set @location in the constructor') unless defined?(@location)
  @location
end
multiline_arg() click to toggle source
# File lib/cucumber/core/ast/location.rb, line 175
def multiline_arg
  # will be overriden by nodes that actually have a multiline_argument
  EmptyMultilineArgument.new
end
tags() click to toggle source
# File lib/cucumber/core/ast/location.rb, line 165
def tags
  # will be overriden by nodes that actually have tags
  []
end

Private Instance Methods

line() click to toggle source
# File lib/cucumber/core/ast/location.rb, line 148
def line
  location.line
end