class Thingfish::Metastore::PgGraph::Edge
A row representing a relationship between two node objects.
Public Class Methods
new( * )
click to toggle source
Do some initial attribute setup for new objects.
Calls superclass method
# File lib/thingfish/metastore/pggraph/edge.rb, line 34 def initialize( * ) super self[ :prop ] ||= Sequel.pg_jsonb({}) end
Public Instance Methods
prop_expr( field )
click to toggle source
Returns a Sequel expression suitable for use as the key of a query against the specified property field.
# File lib/thingfish/metastore/pggraph/edge.rb, line 26 def prop_expr( field ) return Sequel.pg_jsonb( :prop ).get_text( field.to_s ) end
Protected Instance Methods
method_missing( sym, *args, &block )
click to toggle source
Proxy method – fetch a value from the edge property hash if it exists.
Calls superclass method
# File lib/thingfish/metastore/pggraph/edge.rb, line 46 def method_missing( sym, *args, &block ) return self.prop[ sym.to_s ] || super end