Class: Ramaze::Fiber
Instance Attribute Summary collapse
-
#state ⇒ Object
Returns the value of attribute state.
Class Method Summary collapse
-
.new(*args) ⇒ Object
initialize isn’t being called, so we have to hook into ::new.
Instance Method Summary collapse
Instance Attribute Details
#state ⇒ Object
Returns the value of attribute state.
10 11 12 |
# File 'lib/ramaze/snippets/ramaze/fiber.rb', line 10 def state @state end |
Class Method Details
.new(*args) ⇒ Object
initialize isn’t being called, so we have to hook into ::new
4 5 6 7 8 |
# File 'lib/ramaze/snippets/ramaze/fiber.rb', line 4 def self.new(*args) instance = super instance.state = {} instance end |
Instance Method Details
#[](key) ⇒ Object
12 13 14 |
# File 'lib/ramaze/snippets/ramaze/fiber.rb', line 12 def [](key) @state[key] end |
#[]=(key, value) ⇒ Object
16 17 18 |
# File 'lib/ramaze/snippets/ramaze/fiber.rb', line 16 def []=(key, value) @state[key] = value end |
#key?(key) ⇒ Boolean
20 21 22 |
# File 'lib/ramaze/snippets/ramaze/fiber.rb', line 20 def key?(key) @state.key?(key) end |