Class: Fiona7::TypeLoader::AttributeTypeHelper
- Inherits:
-
Object
- Object
- Fiona7::TypeLoader::AttributeTypeHelper
- Defined in:
- lib/fiona7/type_loader.rb
Instance Attribute Summary collapse
-
#cms_attribute ⇒ Object
Returns the value of attribute cms_attribute.
Instance Method Summary collapse
-
#initialize(cms_attribute) ⇒ AttributeTypeHelper
constructor
A new instance of AttributeTypeHelper.
- #real_type ⇒ Object
- #virtual_type ⇒ Object
Constructor Details
#initialize(cms_attribute) ⇒ AttributeTypeHelper
Returns a new instance of AttributeTypeHelper.
9 10 11 |
# File 'lib/fiona7/type_loader.rb', line 9 def initialize(cms_attribute) self.cms_attribute = cms_attribute end |
Instance Attribute Details
#cms_attribute ⇒ Object
Returns the value of attribute cms_attribute.
7 8 9 |
# File 'lib/fiona7/type_loader.rb', line 7 def cms_attribute @cms_attribute end |
Instance Method Details
#real_type ⇒ Object
13 14 15 |
# File 'lib/fiona7/type_loader.rb', line 13 def real_type self.cms_attribute.attribute_type end |
#virtual_type ⇒ Object
17 18 19 |
# File 'lib/fiona7/type_loader.rb', line 17 def virtual_type ::JSON.parse(cms_attribute.help_text(:de))['type'].to_sym rescue nil end |