Module: Vedeu::API::Store

Extended by:
Store
Included in:
Store
Defined in:
lib/vedeu/api/store.rb

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

#resetObject



16
17
18
# File 'lib/vedeu/api/store.rb', line 16

def reset
  @storage = {}
end