Method: Ektoplayer::ColumnFormat._parse_markup

Defined in:
lib/ektoplayer/config.rb

._parse_markup(format) ⇒ Object



39
40
41
42
43
44
45
46
47
48
# File 'lib/ektoplayer/config.rb', line 39

def self._parse_markup(format)
   Nokogiri::XML("<f>#{format}</f>").first_element_child.
      children.map do |fmt|
         fmt1 = fmt.attributes.map do |name,a|
            [name.to_sym, a.value]
         end.to_h.update(tag: fmt.name)
         fmt1[:text] = fmt.text if fmt1[:tag] == 'text'
         fmt1
   end
end