Class: Ruote::EngineVariables
- Inherits:
-
Object
- Object
- Ruote::EngineVariables
- Defined in:
- lib/ruote/engine.rb
Overview
A wrapper class giving easy access to engine variables.
There is one instance of this class for an Engine instance. It is returned when calling Engine#variables.
Instance Method Summary collapse
- #[](k) ⇒ Object
- #[]=(k, v) ⇒ Object
-
#initialize(storage) ⇒ EngineVariables
constructor
A new instance of EngineVariables.
Constructor Details
#initialize(storage) ⇒ EngineVariables
Returns a new instance of EngineVariables.
988 989 990 991 |
# File 'lib/ruote/engine.rb', line 988 def initialize(storage) @storage = storage end |
Instance Method Details
#[](k) ⇒ Object
993 994 995 996 |
# File 'lib/ruote/engine.rb', line 993 def [](k) @storage.get_engine_variable(k) end |
#[]=(k, v) ⇒ Object
998 999 1000 1001 |
# File 'lib/ruote/engine.rb', line 998 def []=(k, v) @storage.put_engine_variable(k, v) end |