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