Module: OmfEc::GroupExt
- Included in:
- Group
- Defined in:
- omf_ec/lib/omf_ec/group_ext.rb
Constant Summary
- @@methods_to_fwd =
[]
Instance Method Summary (collapse)
Instance Method Details
- (Object) fwd_method_to_aliases(*m)
5 6 7 |
# File 'omf_ec/lib/omf_ec/group_ext.rb', line 5 def fwd_method_to_aliases(*m) @@methods_to_fwd += m.flatten end |
- (Object) method_added(m)
9 10 11 12 13 14 15 16 17 |
# File 'omf_ec/lib/omf_ec/group_ext.rb', line 9 def method_added(m) if @@methods_to_fwd.delete(m) alias_method "#{m}_without_fwd_to_aliases", m define_method m do |*args, &block| method("#{m}_without_fwd_to_aliases").call(*args, &block) self.g_aliases.each { |g| g.send(m, *args, &block) } end end end |