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

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

Instance Method Summary collapse

Instance Method Details

#attributesObject



163
164
165
# File 'lib/cucumber/core/test/location.rb', line 163

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

#commentsObject



172
173
174
175
# File 'lib/cucumber/core/test/location.rb', line 172

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

#fileObject



149
150
151
# File 'lib/cucumber/core/test/location.rb', line 149

def file
  location.file
end

#file_colon_lineObject



145
146
147
# File 'lib/cucumber/core/test/location.rb', line 145

def file_colon_line
  location.to_s
end

#lineObject



153
154
155
# File 'lib/cucumber/core/test/location.rb', line 153

def line
  location.line
end

#locationObject



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

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

  @location
end

#multiline_argObject



177
178
179
180
# File 'lib/cucumber/core/test/location.rb', line 177

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

#tagsObject



167
168
169
170
# File 'lib/cucumber/core/test/location.rb', line 167

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