Method: OEHClient::Meta::Entity#get

Defined in:
lib/oehclient/meta/entity.rb

#get(active_session, attribute_nvp, **args) ⇒ Object

def get_collection



69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/oehclient/meta/entity.rb', line 69

def get(active_session, attribute_nvp, **args)
	# store the active session object for future use
	session = active_session 	if (session.nil?)
	# initialize the entity instance as a blank hash
	entity_instance = Hash.new
	# Get the collection of objects requested
	get_collection(session, **args).each do | collection_instance |
		# find the matching entry and assign the entity instance
		entity_instance = collection_instance if (collection_instance[attribute_nvp[:name]].casecmp(attribute_nvp[:value]) == 0)
	end # Each OEHClient::Meta::Entity.get_collection
	# return the copy of the entity instance data
	entity_instance
end