Class: MethodDecorator::Decoration
- Inherits:
-
Object
- Object
- MethodDecorator::Decoration
- Defined in:
- lib/method_decorator/decoration.rb
Instance Attribute Summary collapse
-
#decoration ⇒ Object
Returns the value of attribute decoration.
-
#target_class ⇒ Object
Returns the value of attribute target_class.
-
#target_method ⇒ Object
Returns the value of attribute target_method.
-
#target_method_name ⇒ Object
Returns the value of attribute target_method_name.
Instance Method Summary collapse
-
#initialize(target_class, target_method_name, target_method) ⇒ Decoration
constructor
A new instance of Decoration.
Constructor Details
#initialize(target_class, target_method_name, target_method) ⇒ Decoration
Returns a new instance of Decoration.
6 7 8 9 10 11 |
# File 'lib/method_decorator/decoration.rb', line 6 def initialize(target_class, target_method_name, target_method) self.target_class = target_class self.target_method_name = target_method_name self.target_method = target_method self.decoration = block_given? ? Proc.new : nil end |
Instance Attribute Details
#decoration ⇒ Object
Returns the value of attribute decoration.
4 5 6 |
# File 'lib/method_decorator/decoration.rb', line 4 def decoration @decoration end |
#target_class ⇒ Object
Returns the value of attribute target_class.
4 5 6 |
# File 'lib/method_decorator/decoration.rb', line 4 def target_class @target_class end |
#target_method ⇒ Object
Returns the value of attribute target_method.
4 5 6 |
# File 'lib/method_decorator/decoration.rb', line 4 def target_method @target_method end |
#target_method_name ⇒ Object
Returns the value of attribute target_method_name.
4 5 6 |
# File 'lib/method_decorator/decoration.rb', line 4 def target_method_name @target_method_name end |