Created
March 14, 2011 08:10
-
-
Save zdavatz/868888 to your computer and use it in GitHub Desktop.
cache_entry.rb - ODBA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def odba_cut_connections! | |
@accessed_by.each { |object_id, odba_id| | |
if((item = odba_id2ref(odba_id) || object_id2ref(object_id, odba_id)) \ | |
&& item.respond_to?(:odba_cut_connection)) | |
item.odba_cut_connection(_odba_object) | |
end | |
} | |
end |
@accessed_by = {1=>2, 3=>4}
def test
@accessed_by.each do |k,v|
print k, " ", v, "\n"
end
return @accessed_by
end
p test
output:
1 2
3 4
{1=>2, 3=>4}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The '@accessced_by' is set in the 'initialize' method as a Hash instance.
The '@accessced_by' Hash instance is the return value of the method 'odba_cut_connections!'