Class: Feedzirra::Backend::Memory
- Inherits:
-
Object
- Object
- Feedzirra::Backend::Memory
- Defined in:
- lib/feedzirra/backend/memory.rb
Overview
Memory store uses a ruby Hash to store the results of feed fetches. It won't persist after the application exits.
Instance Method Summary collapse
- #get(url) ⇒ Object
-
#initialize(options = { }) ⇒ Memory
constructor
A new instance of Memory.
- #set(url, result) ⇒ Object
Constructor Details
#initialize(options = { }) ⇒ Memory
Returns a new instance of Memory.
8 9 10 |
# File 'lib/feedzirra/backend/memory.rb', line 8 def initialize( = { }) @store = { } end |
Instance Method Details
#get(url) ⇒ Object
12 13 14 |
# File 'lib/feedzirra/backend/memory.rb', line 12 def get(url) @store[url] end |
#set(url, result) ⇒ Object
16 17 18 |
# File 'lib/feedzirra/backend/memory.rb', line 16 def set(url, result) @store[url] = result end |