Class: Voom::Presenters::Demo::DragonDrop
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- Voom::Presenters::Demo::DragonDrop
- Includes:
- WebClient::Helpers::ExpandHash
- Defined in:
- lib/voom/presenters/demo/dragon_drop.rb
Instance Method Summary collapse
Methods included from WebClient::Helpers::ExpandHash
Instance Method Details
#fetch_dragons ⇒ Object
35 36 37 |
# File 'lib/voom/presenters/demo/dragon_drop.rb', line 35 def fetch_dragons JSON.parse(session[:dragons], object_class: OpenStruct) end |
#save(dragons) ⇒ Object
39 40 41 |
# File 'lib/voom/presenters/demo/dragon_drop.rb', line 39 def save(dragons) session[:dragons] = dragons.map {|d| (d)}.to_json end |