5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/rspec/parameterized/table_syntax/table_syntax_implement.rb', line 5
def |(other)
where_binding = binding.of_caller(1) caller_instance = eval("self", where_binding)
if caller_instance.instance_variable_defined?(:@__parameter_table)
table = caller_instance.instance_variable_get(:@__parameter_table)
else
table = RSpec::Parameterized::TableSyntax::Table.new
caller_instance.instance_variable_set(:@__parameter_table, table)
end
row = Table::Row.new(self)
table.add_row(row)
row.add_param(other)
table
end
|