Class: CloudFormer::PropertyOrAttribute
- Inherits:
-
Object
- Object
- CloudFormer::PropertyOrAttribute
- Defined in:
- lib/cloud_former/property_or_attribute.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #as_json_for(instance) ⇒ Object
-
#initialize(name, options) ⇒ PropertyOrAttribute
constructor
A new instance of PropertyOrAttribute.
Constructor Details
#initialize(name, options) ⇒ PropertyOrAttribute
Returns a new instance of PropertyOrAttribute.
7 8 9 10 |
# File 'lib/cloud_former/property_or_attribute.rb', line 7 def initialize(name, ) @name = name = end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/cloud_former/property_or_attribute.rb', line 4 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/cloud_former/property_or_attribute.rb', line 5 def end |
Instance Method Details
#as_json_for(instance) ⇒ Object
12 13 14 |
# File 'lib/cloud_former/property_or_attribute.rb', line 12 def as_json_for(instance) val_as_json(instance.send(name)) end |