Module: Vedeu::Store
Instance Method Summary collapse
Instance Method Details
#create(attributes) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/vedeu/models/store.rb', line 7 def create(attributes) storage.store(attributes[:name], attributes) Buffers.create(Interface.new(attributes)) storage end |
#query(name) ⇒ Object
15 16 17 |
# File 'lib/vedeu/models/store.rb', line 15 def query(name) storage.fetch(name) { fail EntityNotFound, 'Interface was not found.' } end |
#reset ⇒ Object
19 20 21 |
# File 'lib/vedeu/models/store.rb', line 19 def reset @storage = {} end |