Class: FakeSNS::MemoryStorage
Instance Method Summary
collapse
Methods inherited from Storage
#[], #[]=, for, #initialize
Instance Method Details
#replace(data) ⇒ Object
44
45
46
|
# File 'lib/fake_sns/storage.rb', line 44
def replace(data)
@storage = YAML.load(data)
end
|
#storage ⇒ Object
36
37
38
|
# File 'lib/fake_sns/storage.rb', line 36
def storage
@storage ||= {}
end
|
#to_yaml ⇒ Object
31
32
33
|
# File 'lib/fake_sns/storage.rb', line 31
def to_yaml
storage.to_yaml
end
|
#transaction ⇒ Object
40
41
42
|
# File 'lib/fake_sns/storage.rb', line 40
def transaction
yield
end
|