class Cucumber::Core::Ast::ExamplesTable::Row

Attributes

comments[R]
data[R]
language[R]
number[R]

Public Class Methods

new(data, number, location, language, comments) click to toggle source
# File lib/cucumber/core/ast/examples_table.rb, line 68
def initialize(data, number, location, language, comments)
  raise ArgumentError, data.to_s unless data.is_a?(Hash)
  @data = data
  @number = number
  @location = location
  @language = language
  @comments = comments
end

Public Instance Methods

==(other) click to toggle source
# File lib/cucumber/core/ast/examples_table.rb, line 77
def ==(other)
  return false unless other.class == self.class
  other.number == number &&
    other.location == location &&
    other.data == data
end
[](parameter_name) click to toggle source
# File lib/cucumber/core/ast/examples_table.rb, line 84
def [](parameter_name)
  @data[parameter_name]
end
expand(string) click to toggle source
# File lib/cucumber/core/ast/examples_table.rb, line 92
def expand(string)
  result = string.dup
  @data.each do |key, value|
    result.gsub!("<#{key}>", value.to_s)
  end
  result
end
inspect() click to toggle source
# File lib/cucumber/core/ast/examples_table.rb, line 100
def inspect
  "#<#{self.class}: #{@data.inspect} (#{location})>"
end
values() click to toggle source
# File lib/cucumber/core/ast/examples_table.rb, line 88
def values
  @data.values
end

Private Instance Methods

description_for_visitors() click to toggle source
# File lib/cucumber/core/ast/examples_table.rb, line 110
def description_for_visitors
  :examples_table_row
end