Method: UCD::AttributeParser#parse

Defined in:
lib/ucd/attribute_parser.rb

#parse(io, options = {}) ⇒ Object



16
17
18
19
20
21
# File 'lib/ucd/attribute_parser.rb', line 16

def parse(io, options={})
  tree = Transform.new.apply(super)
  tree = tree[:assignments].each_with_object({}) { |assignment, memo| memo[assignment[:name].to_s] = assignment[:value] }

  tree
end