class RSpec::Variants::Table
Attributes
last_row[R]
Public Class Methods
new()
click to toggle source
# File lib/rspec/variants/table.rb, line 6 def initialize @rows = [] @last_row = nil end
Public Instance Methods
add_condition_to_last_row(condition)
click to toggle source
# File lib/rspec/variants/table.rb, line 19 def add_condition_to_last_row(condition) last_row.add_condition(condition) self end
Also aliased as: |
add_row(row)
click to toggle source
# File lib/rspec/variants/table.rb, line 11 def add_row(row) unless @rows.find { |r| r.object_id == row.object_id } @rows << row @last_row = row end self end
to_a()
click to toggle source
# File lib/rspec/variants/table.rb, line 26 def to_a @rows.map(&:to_a) end
Also aliased as: to_conditions