Class: Fiona7::AttributeReaders::WidgetlistAsLinklist
- Inherits:
-
AttributeReader
- Object
- AttributeReader
- Fiona7::AttributeReaders::WidgetlistAsLinklist
- Defined in:
- lib/fiona7/attribute_readers/widgetlist_as_linklist.rb
Instance Method Summary collapse
Methods inherited from AttributeReader
Constructor Details
This class inherits a constructor from Fiona7::AttributeReaders::AttributeReader
Instance Method Details
#call ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/fiona7/attribute_readers/widgetlist_as_linklist.rb', line 6 def call linklist = self.obj.attr_values[self.attr_name] || [] if !linklist.empty? = [] = linklist.map do |link| = link["title"] # sometimes a released page references an unreleased widget # it is then impossible to load it into widget_pool # but the reference in the widgetlist field is still there # therefore we need to check if the widget has been loaded # into the pool - only then it can be included if () << end end end end |