Class: Object::TryObject
Instance Method Summary collapse
-
#initialize(original_object) ⇒ TryObject
constructor
A new instance of TryObject.
- #method_missing(method, *args, &block) ⇒ Object
Constructor Details
#initialize(original_object) ⇒ TryObject
Returns a new instance of TryObject.
6 7 8 9 |
# File 'lib/core_ext/object.rb', line 6 def initialize(original_object) @original_object = original_object end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
11 12 13 |
# File 'lib/core_ext/object.rb', line 11 def method_missing(method, *args, &block) @original_object.send(method, *args, &block) if(@original_object.respond_to? method) end |