Class: CloudFile::Memory

Inherits:
Service show all
Defined in:
lib/cloud_file/providers/memory.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Service

auth_value, #files, #open, #read_format, register, register_converter, uri_format

Class Method Details

.for_user(user) ⇒ Object



20
21
22
# File 'lib/cloud_file/providers/memory.rb', line 20

def for_user(user)
  instance
end

.method_missing(sym, *args, &b) ⇒ Object



16
17
18
# File 'lib/cloud_file/providers/memory.rb', line 16

def method_missing(sym,*args,&b)
  instance.send(sym,*args,&b)
end

Instance Method Details

#read(key) ⇒ Object



6
7
8
# File 'lib/cloud_file/providers/memory.rb', line 6

def read(key)
  world[key.to_s]
end

#write(key, val) ⇒ Object



9
10
11
# File 'lib/cloud_file/providers/memory.rb', line 9

def write(key,val)
  world[key.to_s] = val
end