Class: Decoru::Decorator
- Inherits:
-
Object
- Object
- Decoru::Decorator
- Includes:
- ActiveModel::Serialization, ActiveModel::Serializers::JSON
- Defined in:
- lib/decoru/decorator.rb
Overview
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Instance Method Summary collapse
- #decorated? ⇒ Boolean
-
#initialize(object) ⇒ Decorator
constructor
A new instance of Decorator.
Constructor Details
#initialize(object) ⇒ Decorator
Returns a new instance of Decorator.
16 17 18 |
# File 'lib/decoru/decorator.rb', line 16 def initialize(object) @object = object end |
Instance Attribute Details
#object ⇒ Object (readonly)
Returns the value of attribute object.
14 15 16 |
# File 'lib/decoru/decorator.rb', line 14 def object @object end |
Instance Method Details
#decorated? ⇒ Boolean
20 21 22 |
# File 'lib/decoru/decorator.rb', line 20 def decorated? true end |