Class: Hobelar::Parsers
- Inherits:
-
Nokogiri::XML::SAX::Document
- Object
- Nokogiri::XML::SAX::Document
- Hobelar::Parsers
show all
- Defined in:
- lib/hobelar/parsers.rb,
lib/hobelar/parsers/getcheck.rb,
lib/hobelar/parsers/getfilter.rb
Defined Under Namespace
Classes: GetCheck, GetFilter
Instance Method Summary
collapse
Constructor Details
Returns a new instance of Parsers.
6
7
8
|
# File 'lib/hobelar/parsers.rb', line 6
def initialize
@response = {}
end
|
Instance Method Details
#attr_value(name, attrs) ⇒ Object
15
16
17
|
# File 'lib/hobelar/parsers.rb', line 15
def attr_value(name, attrs)
(entry = attrs.detect {|a,v| a == name }) && entry.last
end
|
#characters(string) ⇒ Object
10
11
12
13
|
# File 'lib/hobelar/parsers.rb', line 10
def characters(string)
@value ||= ''
@value << string.strip
end
|
#start_element(name, attrs = []) ⇒ Object
19
20
21
|
# File 'lib/hobelar/parsers.rb', line 19
def start_element(name, attrs = [])
@value = nil
end
|