Sha256: 7b427f905f7621cb7c536104710a2a7191c79075c458e6225b3719774dad8a67
Contents?: true
Size: 759 Bytes
Versions: 7
Compression:
Stored size: 759 Bytes
Contents
module Fiona7 # Takes a Fiona7::WriteObj as input and iterates over each # widgetlist attribute that it has. # # This is very low-level class hence it returns mangled attribute names class WidgetlistEnumerator def initialize(object) self.object = object end def each self.object.attr_values.each do |attr_name, attr_value| next unless attr_name != "X_widget_pool" next unless self.widgetlist?(object, attr_name) yield(attr_name, attr_value) end end protected attr_accessor :object def widgetlist?(object, attr_name) attr_def = object.attr_defs[attr_name] || {} type_tag = (attr_def["help_texts"]||{})["de"]||"" type_tag =~ /"widgetlist"/ end end end
Version data entries
7 entries across 7 versions & 1 rubygems