Class: PgGraph::Data::RecordValue

Inherits:
Value
  • Object
show all
Defined in:
lib/pg_graph/data/value.rb

Overview

Fake class: RecordValue.new(table, records) simply returns the Record object

Instance Attribute Summary

Attributes inherited from Value

#referenced_object

Attributes inherited from Node

#dimension, #type

Class Method Summary collapse

Methods inherited from Value

#initialize

Methods inherited from Node

#data, #initialize, #inspect, #object, #to_h, #to_yaml, #value, #value_type

Constructor Details

This class inherits a constructor from PgGraph::Data::Value

Class Method Details

.new(table, records) ⇒ Object



12
13
14
15
16
# File 'lib/pg_graph/data/value.rb', line 12

def self.new(table, records) 
  constrain table, Table
  constrain records, [Record]
  records.first
end