# 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
# 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
# File lib/cucumber/core/ast/examples_table.rb, line 88 def expand(string) result = string.dup @data.each do |key, value| result.gsub!("<#{key}>", value.to_s) end result end
# File lib/cucumber/core/ast/examples_table.rb, line 96 def inspect "#<#{self.class}: #{@data.inspect} (#{location})>" end
# File lib/cucumber/core/ast/examples_table.rb, line 84 def values @data.values end
# File lib/cucumber/core/ast/examples_table.rb, line 106 def description_for_visitors :examples_table_row end