Class: Fiona7::TypeLoader::AttributeTypeHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/fiona7/type_loader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_attributeObject

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_typeObject



13
14
15
# File 'lib/fiona7/type_loader.rb', line 13

def real_type
  self.cms_attribute.attribute_type
end

#virtual_typeObject



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