Class: DeviceMap::Properties::Property
- Inherits:
-
Struct
- Object
- Struct
- DeviceMap::Properties::Property
- Defined in:
- lib/device_map/properties/property.rb
Constant Summary collapse
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#source_name ⇒ Object
Returns the value of attribute source_name.
-
#type_name ⇒ Object
Returns the value of attribute type_name.
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
3 4 5 |
# File 'lib/device_map/properties/property.rb', line 3 def name @name end |
#source_name ⇒ Object
Returns the value of attribute source_name
3 4 5 |
# File 'lib/device_map/properties/property.rb', line 3 def source_name @source_name end |
#type_name ⇒ Object
Returns the value of attribute type_name
3 4 5 |
# File 'lib/device_map/properties/property.rb', line 3 def type_name @type_name end |
Instance Method Details
#cast(value) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/device_map/properties/property.rb', line 10 def cast(value) return if value.nil? type = TYPE_MAPPING.fetch(type_name) type.cast(value) end |