Class: MethodDecorator::Models::Decoration
- Defined in:
- lib/method_decorator/models/decoration.rb
Instance Attribute Summary collapse
-
#decoration ⇒ Object
Returns the value of attribute decoration.
-
#klass ⇒ Object
Returns the value of attribute klass.
-
#method_instance ⇒ Object
Returns the value of attribute method_instance.
-
#method_name ⇒ Object
Returns the value of attribute method_name.
Instance Method Summary collapse
-
#initialize(klass, method_name, method_instance) ⇒ Decoration
constructor
A new instance of Decoration.
Constructor Details
#initialize(klass, method_name, method_instance) ⇒ Decoration
Returns a new instance of Decoration.
10 11 12 13 14 15 16 |
# File 'lib/method_decorator/models/decoration.rb', line 10 def initialize(klass, method_name, method_instance) self.klass = klass self.method_name = method_name self.method_instance = method_instance self.decoration = block_given? ? Proc.new : nil validate! end |
Instance Attribute Details
#decoration ⇒ Object
Returns the value of attribute decoration.
8 9 10 |
# File 'lib/method_decorator/models/decoration.rb', line 8 def decoration @decoration end |
#klass ⇒ Object
Returns the value of attribute klass.
8 9 10 |
# File 'lib/method_decorator/models/decoration.rb', line 8 def klass @klass end |
#method_instance ⇒ Object
Returns the value of attribute method_instance.
8 9 10 |
# File 'lib/method_decorator/models/decoration.rb', line 8 def method_instance @method_instance end |
#method_name ⇒ Object
Returns the value of attribute method_name.
8 9 10 |
# File 'lib/method_decorator/models/decoration.rb', line 8 def method_name @method_name end |