Class: Audrey::Object::Custom::Graph::Undirected

Inherits:
Audrey::Object::Custom::Graph show all
Defined in:
lib/audrey.rb

Overview

Audrey::Object::Custom::Graph::Undirected

Instance Method Summary collapse

Methods inherited from Audrey::Object::Custom

#audrey, descendant?, fields, has_checks?, #initialize, new_auto_fields, own_fields

Methods included from Searchable

#count, #each, #first, #sample, #samples

Methods inherited from Hash

hsa, node_class

Methods inherited from Audrey::Object

aclasses, descendants, fco, inherited, isolate

Constructor Details

This class inherits a constructor from Audrey::Object::Custom

Instance Method Details

#records(*recs) ⇒ Object


records



2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
# File 'lib/audrey.rb', line 2208

def records(*recs)
	# $tm.hrm
	
	# sort by pk
	recs.sort! do |x, y|
		x.audrey.pk <=> y.audrey.pk
	end
	
	# store
	self.a = recs[0]
	self.b = recs[1]
end