Class: RmsWebService::Response::Item::Search

Inherits:
Parser
  • Object
show all
Defined in:
lib/rms_web_service/response/item/search.rb

Instance Attribute Summary collapse

Attributes inherited from Parser

#status

Instance Method Summary collapse

Methods inherited from Parser

#set_attribute, #set_attributes

Constructor Details

#initialize(xml) ⇒ Search

Returns a new instance of Search.



6
7
8
9
# File 'lib/rms_web_service/response/item/search.rb', line 6

def initialize(xml)
  super
  @parsed_xml.xpath("//items").children.each {|item| self << Get.new(item.to_xml)}
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



5
6
7
# File 'lib/rms_web_service/response/item/search.rb', line 5

def code
  @code
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/rms_web_service/response/item/search.rb', line 11

def success?
  return @code == "200-00" ? true : false
end