Class: Epp::Eis::NssetCheckResponse
- Inherits:
-
Object
- Object
- Epp::Eis::NssetCheckResponse
- Defined in:
- lib/epp-eis/nsset.rb
Instance Method Summary collapse
- #code ⇒ Object
-
#initialize(response) ⇒ NssetCheckResponse
constructor
A new instance of NssetCheckResponse.
- #items ⇒ Object
- #message ⇒ Object
Constructor Details
#initialize(response) ⇒ NssetCheckResponse
Returns a new instance of NssetCheckResponse.
23 24 25 |
# File 'lib/epp-eis/nsset.rb', line 23 def initialize(response) @response = Nokogiri::XML(response) end |
Instance Method Details
#code ⇒ Object
27 28 29 |
# File 'lib/epp-eis/nsset.rb', line 27 def code @response.css('epp response result').first['code'].to_i end |
#items ⇒ Object
35 36 37 38 39 40 41 42 |
# File 'lib/epp-eis/nsset.rb', line 35 def items @response.css('nsset|chkData nsset|cd', 'nsset' => XML_NS_NSSET).collect do |nsset| NssetCheck.new( nsset.css('nsset|id', 'nsset' => XML_NS_NSSET).text, nsset.css('nsset|id', 'nsset' => XML_NS_NSSET).first['avail'].to_i == 1 ) end end |
#message ⇒ Object
31 32 33 |
# File 'lib/epp-eis/nsset.rb', line 31 def @response.css('epp response result msg').text end |