Class: Synaptic4r::Versions

Inherits:
Result
  • Object
show all
Defined in:
lib/synaptic4r/result.rb

Instance Attribute Summary

Attributes inherited from Result

#headers, #http_request, #payload, #result, #sign, #url

Instance Method Summary collapse

Methods inherited from Result

#extract_header, #method_missing, #stringify_array, #stringify_hash

Constructor Details

#initialize(args) ⇒ Versions

.….….….….….….….….….….….….….….….….….….….….….….….….……



185
186
187
188
189
190
# File 'lib/synaptic4r/result.rb', line 185

def initialize(args)
  super
  if args[:result]
    @versions =  REXML::Document.new(args[:result].net_http_res.body).root
  end
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Synaptic4r::Result

Instance Method Details

#oidsObject

.….….….….….….….….….….….….….….….….….….….….….….….….……



199
200
201
# File 'lib/synaptic4r/result.rb', line 199

def oids
  @versions.elements.to_a('ObjectID').map{|o| o.text}      
end

.….….….….….….….….….….….….….….….….….….….….….….….….……



193
194
195
196
# File 'lib/synaptic4r/result.rb', line 193

def print
  poids = oids
  poids.inject("") {|r,o| r += "  #{o}\n"} unless poids.empty?
end