Class: PgGraph::Data::TableValue
- Defined in:
- lib/pg_graph/data/value.rb
Instance Attribute Summary
Attributes inherited from Value
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(table, records = []) ⇒ TableValue
constructor
A new instance of TableValue.
Methods inherited from Node
#data, #inspect, #object, #to_h, #to_yaml, #value, #value_type
Constructor Details
#initialize(table, records = []) ⇒ TableValue
Returns a new instance of TableValue.
29 30 31 32 33 34 35 |
# File 'lib/pg_graph/data/value.rb', line 29 def initialize(table, records = []) constrain table, Table constrain records, [Record] super(table.type, table, dimension: 2 ) @impl = Table.new(table.schema, table.type) records.each { |r| @impl.send(:add_record, r) } end |