Class: GusBir1::Response::Search
- Inherits:
-
Object
- Object
- GusBir1::Response::Search
- Defined in:
- lib/gus_bir1/response/search.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
Instance Method Summary collapse
- #array ⇒ Object
-
#initialize(body) ⇒ Search
constructor
A new instance of Search.
Constructor Details
#initialize(body) ⇒ Search
Returns a new instance of Search.
11 12 13 |
# File 'lib/gus_bir1/response/search.rb', line 11 def initialize(body) @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
15 16 17 |
# File 'lib/gus_bir1/response/search.rb', line 15 def body @body end |
Instance Method Details
#array ⇒ Object
17 18 19 20 |
# File 'lib/gus_bir1/response/search.rb', line 17 def array n = Nokogiri.XML body n.xpath('//dane').map { |o| parse_dane(Nori.new.parse(o.to_s)['dane']) } end |