Module: Cucumber::Core::Test::HasLocation

Included in:
Tag
Defined in:
lib/cucumber/core/test/location.rb

Instance Method Summary collapse

Instance Method Details

#attributesObject



165
166
167
# File 'lib/cucumber/core/test/location.rb', line 165

def attributes
  [tags, comments, multiline_arg].flatten
end

#commentsObject



174
175
176
177
# File 'lib/cucumber/core/test/location.rb', line 174

def comments
  # will be overridden by nodes that actually have comments
  []
end

#fileObject



151
152
153
# File 'lib/cucumber/core/test/location.rb', line 151

def file
  location.file
end

#file_colon_lineObject



147
148
149
# File 'lib/cucumber/core/test/location.rb', line 147

def file_colon_line
  location.to_s
end

#lineObject



155
156
157
# File 'lib/cucumber/core/test/location.rb', line 155

def line
  location.line
end

#locationObject



159
160
161
162
163
# File 'lib/cucumber/core/test/location.rb', line 159

def location
  raise('Please set @location in the constructor') unless defined?(@location)

  @location
end

#multiline_argObject



179
180
181
182
# File 'lib/cucumber/core/test/location.rb', line 179

def multiline_arg
  # will be overridden by nodes that actually have a multiline_argument
  Test::EmptyMultilineArgument.new
end

#tagsObject



169
170
171
172
# File 'lib/cucumber/core/test/location.rb', line 169

def tags
  # will be overridden by nodes that actually have tags
  []
end