Class: ObjectModel::Metadata::References
- Inherits:
-
Hash
- Object
- Hash
- ObjectModel::Metadata::References
- Defined in:
- lib/ObjectModel/Metadata/reference.rb
Instance Method Summary collapse
- #copy ⇒ Object
- #inherit(parent) ⇒ Object
-
#initialize ⇒ References
constructor
A new instance of References.
Constructor Details
#initialize ⇒ References
Returns a new instance of References.
4 5 6 |
# File 'lib/ObjectModel/Metadata/reference.rb', line 4 def initialize super{should! :be_never_called} end |
Instance Method Details
#copy ⇒ Object
8 9 10 11 12 |
# File 'lib/ObjectModel/Metadata/reference.rb', line 8 def copy c = References.new each{|n, m| c[n] = m.copy} return c end |
#inherit(parent) ⇒ Object
14 15 16 |
# File 'lib/ObjectModel/Metadata/reference.rb', line 14 def inherit parent parent.copy.merge copy end |