Class: Soup::Backends::Memory
Instance Method Summary collapse
- #all_snips ⇒ Object
- #destroy(name) ⇒ Object
- #load_snip(name) ⇒ Object
- #prepare ⇒ Object
- #save_snip(attributes) ⇒ Object
Methods inherited from Base
Instance Method Details
#all_snips ⇒ Object
12 13 14 |
# File 'lib/soup/backends/memory.rb', line 12 def all_snips @snips.values end |
#destroy(name) ⇒ Object
20 21 22 |
# File 'lib/soup/backends/memory.rb', line 20 def destroy(name) @snips[name] = nil end |
#load_snip(name) ⇒ Object
16 17 18 |
# File 'lib/soup/backends/memory.rb', line 16 def load_snip(name) @snips[name] end |
#prepare ⇒ Object
4 5 6 |
# File 'lib/soup/backends/memory.rb', line 4 def prepare @snips = {} end |