Class: Ruote::EngineVariables
- Inherits:
-
Object
- Object
- Ruote::EngineVariables
- Defined in:
- lib/ruote/dashboard.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.
1151 1152 1153 1154 |
# File 'lib/ruote/dashboard.rb', line 1151 def initialize(storage) @storage = storage end |
Instance Method Details
#[](k) ⇒ Object
1156 1157 1158 1159 |
# File 'lib/ruote/dashboard.rb', line 1156 def [](k) @storage.get_engine_variable(k) end |
#[]=(k, v) ⇒ Object
1161 1162 1163 1164 |
# File 'lib/ruote/dashboard.rb', line 1161 def []=(k, v) @storage.put_engine_variable(k, v) end |