Class: Ramaze::Fiber
Instance Attribute Summary collapse
-
#state ⇒ Object
Returns the value of attribute state.
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object
-
#initialize(*args) ⇒ Fiber
constructor
A new instance of Fiber.
- #key?(key) ⇒ Boolean
Constructor Details
#initialize(*args) ⇒ Fiber
Returns a new instance of Fiber.
5 6 7 8 |
# File 'lib/ramaze/snippets/ramaze/fiber.rb', line 5 def initialize(*args) super @state = {} end |
Instance Attribute Details
#state ⇒ Object
Returns the value of attribute state.
3 4 5 |
# File 'lib/ramaze/snippets/ramaze/fiber.rb', line 3 def state @state 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 |