Class: Trenza::Lazy
Defined Under Namespace
Classes: MethodCall
Instance Method Summary collapse
-
#initialize(object) ⇒ Lazy
constructor
A new instance of Lazy.
- #method_missing(meth, *args, &blk) ⇒ Object
Methods included from BlankSlate
Constructor Details
#initialize(object) ⇒ Lazy
Returns a new instance of Lazy.
5 6 7 |
# File 'lib/trenza/lazy.rb', line 5 def initialize(object) @object = object end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &blk) ⇒ Object
9 10 11 12 13 |
# File 'lib/trenza/lazy.rb', line 9 def method_missing(meth, *args, &blk) MethodCall.new do @object.send meth, *args, &blk end end |