Class: App42::Storage::JSONDocument

Inherits:
Object
  • Object
show all
Defined in:
lib/storage/Storage.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(storage) ⇒ JSONDocument

This create the constructor and takes no parameter.



30
31
32
# File 'lib/storage/Storage.rb', line 30

def initialize(storage)
  storage.jsonDocList.push(self);
end

Instance Attribute Details

#docIdObject

Returns the value of attribute docId.



24
25
26
# File 'lib/storage/Storage.rb', line 24

def docId
  @docId
end

#jsonDocObject

Returns the value of attribute jsonDoc.



24
25
26
# File 'lib/storage/Storage.rb', line 24

def jsonDoc
  @jsonDoc
end

Instance Method Details

#to_sObject

Returns the Storage Response in JSON format.

Returns:

  • the response in JSON format.



40
41
42
# File 'lib/storage/Storage.rb', line 40

def to_s
  return "#{self.docId} :  #{self.jsonDoc}"
end