Class: Zizia::WorkAttributes
- Inherits:
-
Object
- Object
- Zizia::WorkAttributes
- Includes:
- Singleton
- Defined in:
- app/lib/zizia/work_attributes.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#local_attributes ⇒ Object
readonly
Returns the value of attribute local_attributes.
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
-
#validators ⇒ Object
readonly
Returns the value of attribute validators.
Instance Method Summary collapse
-
#initialize ⇒ WorkAttributes
constructor
A new instance of WorkAttributes.
-
#klass ⇒ Object
Override to choose a different Work class.
Constructor Details
#initialize ⇒ WorkAttributes
Returns a new instance of WorkAttributes.
18 19 20 21 22 23 24 |
# File 'app/lib/zizia/work_attributes.rb', line 18 def initialize work ||= klass.new @local_attributes || work.local_attributes @attributes ||= work.local_attributes @properties ||= work.send(:properties) @validators ||= work.send(:_validators) end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
16 17 18 |
# File 'app/lib/zizia/work_attributes.rb', line 16 def attributes @attributes end |
#local_attributes ⇒ Object (readonly)
Returns the value of attribute local_attributes.
16 17 18 |
# File 'app/lib/zizia/work_attributes.rb', line 16 def local_attributes @local_attributes end |
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
16 17 18 |
# File 'app/lib/zizia/work_attributes.rb', line 16 def properties @properties end |
#validators ⇒ Object (readonly)
Returns the value of attribute validators.
16 17 18 |
# File 'app/lib/zizia/work_attributes.rb', line 16 def validators @validators end |
Instance Method Details
#klass ⇒ Object
Override to choose a different Work class
27 28 29 |
# File 'app/lib/zizia/work_attributes.rb', line 27 def klass Work end |