Class: Ninetails::PropertyType
- Inherits:
-
Object
- Object
- Ninetails::PropertyType
- Defined in:
- app/components/ninetails/property_type.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#property ⇒ Object
Returns the value of attribute property.
-
#serialized_values ⇒ Object
Returns the value of attribute serialized_values.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name, type) ⇒ PropertyType
constructor
A new instance of PropertyType.
- #serialize ⇒ Object
Constructor Details
#initialize(name, type) ⇒ PropertyType
Returns a new instance of PropertyType.
5 6 7 8 9 |
# File 'app/components/ninetails/property_type.rb', line 5 def initialize(name, type) @name = name @type = type @property = type.new end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'app/components/ninetails/property_type.rb', line 3 def name @name end |
#property ⇒ Object
Returns the value of attribute property.
3 4 5 |
# File 'app/components/ninetails/property_type.rb', line 3 def property @property end |
#serialized_values ⇒ Object
Returns the value of attribute serialized_values.
3 4 5 |
# File 'app/components/ninetails/property_type.rb', line 3 def serialized_values @serialized_values end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'app/components/ninetails/property_type.rb', line 3 def type @type end |
Instance Method Details
#serialize ⇒ Object
16 17 18 19 20 21 22 |
# File 'app/components/ninetails/property_type.rb', line 16 def serialize if serialized_values.present? serialized_values elsif type.respond_to? :serialize type.serialize end end |