Class: Audrey::Node::Collection

Inherits:
Audrey::Node show all
Defined in:
lib/audrey.rb

Overview

Audrey::Node::Collection

Direct Known Subclasses

Array, Hash

Instance Attribute Summary

Attributes inherited from Audrey::Node

#db, #pk

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Audrey::Node

#alive?, #ancestors, #delete_object, #fco, #initialize, #isolate, #row

Constructor Details

This class inherits a constructor from Audrey::Node

Class Method Details

.create_object(p_db, opts = {}) ⇒ Object


create_object



798
799
800
801
802
803
804
# File 'lib/audrey.rb', line 798

def self.create_object(p_db, opts={})
	# $tm.hrm
	obj = new_object()
	node = self.new(p_db, opts)
	node.attach_to obj
	return obj
end

Instance Method Details

#any?Boolean


any?

Returns:

  • (Boolean)


837
838
839
840
# File 'lib/audrey.rb', line 837

def any?
	read_check()
	return @engine.collection_length(@pk) > 0
end

#changedObject


changed



861
862
863
864
# File 'lib/audrey.rb', line 861

def changed
	# $tm.hrm
	return @engine.changed_get(@pk)
end

#changed=(bool) ⇒ Object



866
867
868
869
# File 'lib/audrey.rb', line 866

def changed=(bool)
	# $tm.hrm
	return @engine.changed_set(@pk, bool)
end

#child_pksObject


child_pks



849
850
851
852
# File 'lib/audrey.rb', line 849

def child_pks
	# $tm.hrm
	return @engine.collection_child_pks(@pk)
end

#clearObject


clear



813
814
815
816
# File 'lib/audrey.rb', line 813

def clear
	write_check()
	return @engine.clear_collection(@pk)
end

#lengthObject


length



825
826
827
828
# File 'lib/audrey.rb', line 825

def length
	read_check()
	return @engine.collection_length(@pk)
end