Class: MethodMissingRouter::CallInfo
- Inherits:
-
Object
- Object
- MethodMissingRouter::CallInfo
- Defined in:
- lib/method_missing_router.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#block ⇒ Object
Returns the value of attribute block.
-
#method_name ⇒ Object
Returns the value of attribute method_name.
-
#object ⇒ Object
Returns the value of attribute object.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(object, method_name, *args, &block) ⇒ CallInfo
constructor
A new instance of CallInfo.
- #prepend_argument(new_arg) ⇒ Object
Constructor Details
#initialize(object, method_name, *args, &block) ⇒ CallInfo
Returns a new instance of CallInfo.
95 96 97 98 99 100 |
# File 'lib/method_missing_router.rb', line 95 def initialize(object, method_name, *args, &block) @object = object @method_name = method_name @args = args @block = block end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
94 95 96 |
# File 'lib/method_missing_router.rb', line 94 def args @args end |
#block ⇒ Object
Returns the value of attribute block.
94 95 96 |
# File 'lib/method_missing_router.rb', line 94 def block @block end |
#method_name ⇒ Object
Returns the value of attribute method_name.
94 95 96 |
# File 'lib/method_missing_router.rb', line 94 def method_name @method_name end |
#object ⇒ Object
Returns the value of attribute object.
94 95 96 |
# File 'lib/method_missing_router.rb', line 94 def object @object end |
Instance Method Details
#call ⇒ Object
106 107 108 |
# File 'lib/method_missing_router.rb', line 106 def call @object.send(method_name, *args, &block) end |
#prepend_argument(new_arg) ⇒ Object
102 103 104 |
# File 'lib/method_missing_router.rb', line 102 def prepend_argument(new_arg) @args.unshift(new_arg) end |