Class: Moblues::Reader::Attribute

Inherits:
Object
  • Object
show all
Defined in:
lib/moblues/reader/attribute.rb

Instance Method Summary collapse

Constructor Details

#initializeAttribute



8
9
10
# File 'lib/moblues/reader/attribute.rb', line 8

def initialize
  @type_reader = Type.new
end

Instance Method Details

#attribute(xml) ⇒ Object



12
13
14
15
16
17
# File 'lib/moblues/reader/attribute.rb', line 12

def attribute(xml)
 DataModel::Attribute.new(
   name: xml.attributes['name'],
   type: type_reader.map_type_str(xml.attributes['attributeType'])
 )
end