Class: Integer

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-xml-mapper/basic_containers.rb

Class Method Summary collapse

Class Method Details

.new_from_xml_attr(attr) ⇒ Object



48
49
50
# File 'lib/ruby-xml-mapper/basic_containers.rb', line 48

def self.new_from_xml_attr attr
  attr.value.to_i
end

.new_from_xml_node(node) ⇒ Object



52
53
54
# File 'lib/ruby-xml-mapper/basic_containers.rb', line 52

def self.new_from_xml_node node
  node.content.to_i
end