Class: Dag::Client::API::ObjectsResult

Inherits:
StorageResult show all
Defined in:
lib/dag/client/api/storage_result.rb

Instance Method Summary collapse

Methods inherited from StorageResult

#initialize

Constructor Details

This class inherits a constructor from Dag::Client::API::StorageResult

Instance Method Details

#full_objectsObject



28
29
30
31
32
# File 'lib/dag/client/api/storage_result.rb', line 28

def full_objects
  REXML::XPath.match(@xml_doc, "/ListBucketResult/Contents").map{|m|
    XmlSimple.xml_in(m.to_s)
  }
end

#markerObject



38
39
40
# File 'lib/dag/client/api/storage_result.rb', line 38

def marker
  REXML::XPath.match(@xml_doc, "/ListBucketResult/Marker").map { |b| b.text }.first
end

#maxObject



46
47
48
# File 'lib/dag/client/api/storage_result.rb', line 46

def max
  REXML::XPath.match(@xml_doc, "/ListBucketResult/MaxKeys").map { |b| b.text }.first.to_i
end

#next_markerObject



42
43
44
# File 'lib/dag/client/api/storage_result.rb', line 42

def next_marker
  REXML::XPath.match(@xml_doc, "/ListBucketResult/NextMarker").map { |b| b.text }.first
end

#objectsObject



24
25
26
# File 'lib/dag/client/api/storage_result.rb', line 24

def objects
  REXML::XPath.match(@xml_doc, "/ListBucketResult/Contents/Key").map { |b| b.text }
end

#truncated?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/dag/client/api/storage_result.rb', line 34

def truncated?
  REXML::XPath.match(@xml_doc, "/ListBucketResult/IsTruncated").map { |b| b.text }.first == 'true'
end