Class: ROpenStruct
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- ROpenStruct
- Defined in:
- lib/mccloud/util/rostruct.rb
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(mid, *args) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/mccloud/util/rostruct.rb', line 6 def method_missing(mid, *args) mname = mid.id2name len = args.length if len == 0 @table[mname.intern] = ROpenStruct.new self.new_ostruct_member(mname) @table[mname.intern] else super end end |