Module: Cuttlebone::Session::SessionCollectionExtensions

Defined in:
lib/cuttlebone/session.rb

Instance Method Summary collapse

Instance Method Details

#[](key) ⇒ Object

Raises:



13
14
15
16
# File 'lib/cuttlebone/session.rb', line 13

def [] key
  raise NotFound unless has_key?(key)
  super(key)
end

#create(*stack_objects) ⇒ Object



18
19
20
21
22
# File 'lib/cuttlebone/session.rb', line 18

def create *stack_objects
  s = Cuttlebone::Session.new(*stack_objects)
  send(:[]=, s.id, s)
  s
end