Class: ObjectModel::Metadata::Children
- Inherits:
-
Hash
- Object
- Hash
- ObjectModel::Metadata::Children
- Defined in:
- lib/ObjectModel/Metadata/child.rb
Instance Method Summary collapse
- #copy ⇒ Object
- #inherit(parent) ⇒ Object
-
#initialize ⇒ Children
constructor
A new instance of Children.
Constructor Details
#initialize ⇒ Children
Returns a new instance of Children.
4 5 6 |
# File 'lib/ObjectModel/Metadata/child.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/child.rb', line 8 def copy c = Children.new each{|n, m| c[n] = m.copy} return c end |
#inherit(parent) ⇒ Object
14 15 16 |
# File 'lib/ObjectModel/Metadata/child.rb', line 14 def inherit parent parent.copy.merge copy end |