Class: ObjectModel::Metadata::BaseEvents
- Inherits:
-
Hash
- Object
- Hash
- ObjectModel::Metadata::BaseEvents
show all
- Defined in:
- lib/ObjectModel/Metadata/events.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of BaseEvents.
4
5
6
|
# File 'lib/ObjectModel/Metadata/events.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/events.rb', line 8
def copy
c = self.class.new
each{|n, m| c[n] = m.clone}
return c
end
|
#inherit(parent) ⇒ Object
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/ObjectModel/Metadata/events.rb', line 14
def inherit parent
r = parent.copy
copy.each do |n, m|
if r.include? n
r[n] += m
else
r[n] = m
end
end
return r
end
|