Class: Synaptic4r::StorageObject
- Defined in:
- lib/synaptic4r/result.rb
Instance Attribute Summary
Attributes inherited from Result
#headers, #http_request, #payload, #result, #sign, #url
Instance Method Summary collapse
-
#initialize(args) ⇒ StorageObject
constructor
.….….….….….….….….….….….….….….….….….….….….….….….….……
-
#print ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….……
Methods inherited from Result
#extract_header, #method_missing, #stringify_array, #stringify_hash
Constructor Details
#initialize(args) ⇒ StorageObject
.….….….….….….….….….….….….….….….….….….….….….….….….……
66 67 68 69 70 71 72 73 74 75 |
# File 'lib/synaptic4r/result.rb', line 66 def initialize(args) super if args[:result] location = args[:result].headers[:location] @result = {:oid => /\/rest\/objects\/(.*)/.match(location).captures.first, :location => location, :size => args[:result].headers[:x_emc_delta], :date => args[:result].headers[:date]} end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Synaptic4r::Result
Instance Method Details
#print ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….……
78 79 80 81 |
# File 'lib/synaptic4r/result.rb', line 78 def print (oid.nil? ? '' : "OID: #{oid}\n") + (size.nil? ? '' : "size: #{size} bytes") end |