Class: GusBir1::Response::Search

Inherits:
Object
  • Object
show all
Defined in:
lib/gus_bir1/response/search.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bodyObject (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

#arrayObject



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