Class: OmniAuth::Hattrick::XmlParser

Inherits:
Object
  • Object
show all
Defined in:
lib/omniauth-hattrick/xml_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xml) ⇒ XmlParser

Returns a new instance of XmlParser.



9
10
11
12
# File 'lib/omniauth-hattrick/xml_parser.rb', line 9

def initialize(xml)
  @doc = Nokogiri::XML(xml) 
  @manager_details = {}
end

Instance Attribute Details

#xmlObject (readonly)

Returns the value of attribute xml.



7
8
9
# File 'lib/omniauth-hattrick/xml_parser.rb', line 7

def xml
  @xml
end

Instance Method Details

#parseObject



14
15
16
17
18
# File 'lib/omniauth-hattrick/xml_parser.rb', line 14

def parse
  add_user_id
  add_username
  manager_details
end