Sha256: 4ece1fa213f423a6d0ad9c9579d2d9c8a111ff9e72dceb840be53e9a64a38dc8

Contents?: true

Size: 847 Bytes

Versions: 8

Compression:

Stored size: 847 Bytes

Contents

module NotRelational


class MemoryStorage
  
  def initialize
    clear
  end
  def get(bucket,key)
    return @stuff[bucket+"sdsdw555"+key]
        
  end
  def delete(bucket,key)
    @attributes.delete(bucket+"sdsdw555"+key)
    return @stuff.delete(bucket+"sdsdw555"+key)
        
  end
  def put(bucket,key,object,attributes=nil)
    @stuff[bucket+"sdsdw555"+key]=object
    @attributes[bucket+"sdsdw555"+key]=attributes if attributes    
  end
  def get_content_type(bucket,key)
    return @attributes[bucket+"sdsdw555"+key]['Content-Type'] if @attributes.has_key?(bucket+"sdsdw555"+key)
    return nil
  end
def copy(from_bucket,from_key,to_bucket,to_key,attributes=nil)
  o=get(from_bucket,from_key)
  put(to_bucket,to_key,o,attributes)

end
  def clear()
    @stuff={}
    @attributes={}
  end
  def real_s3
    return self
  end
end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
cloudwow-not_relational-0.1.11 lib/not_relational/memory_storage.rb
cloudwow-not_relational-0.1.2 lib/not_relational/memory_storage.rb
cloudwow-not_relational-0.1.3 lib/not_relational/memory_storage.rb
cloudwow-not_relational-0.1.5 lib/not_relational/memory_storage.rb
cloudwow-not_relational-0.1.6 lib/not_relational/memory_storage.rb
cloudwow-not_relational-0.1.7 lib/not_relational/memory_storage.rb
cloudwow-not_relational-0.1.8 lib/not_relational/memory_storage.rb
cloudwow-not_relational-0.1.9 lib/not_relational/memory_storage.rb