module Cucumber::Core::Ast::HasLocation

Public Instance Methods

all_locations() click to toggle source
# File lib/cucumber/core/ast/location.rb, line 158
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 162
def attributes
  [tags, comments, multiline_arg].flatten
end
comments() click to toggle source
# File lib/cucumber/core/ast/location.rb, line 171
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 145
def file
  location.file
end
file_colon_line() click to toggle source
# File lib/cucumber/core/ast/location.rb, line 141
def file_colon_line
  location.to_s
end
location() click to toggle source
# File lib/cucumber/core/ast/location.rb, line 153
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 176
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 166
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 149
def line
  location.line
end