Class: Ruote::EngineVariables

Inherits:
Object
  • Object
show all
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

Constructor Details

#initialize(storage) ⇒ EngineVariables

Returns a new instance of EngineVariables.



1307
1308
1309
1310
# File 'lib/ruote/dashboard.rb', line 1307

def initialize(storage)

  @storage = storage
end

Instance Method Details

#[](k) ⇒ Object



1312
1313
1314
1315
# File 'lib/ruote/dashboard.rb', line 1312

def [](k)

  @storage.get_engine_variable(k)
end

#[]=(k, v) ⇒ Object



1317
1318
1319
1320
# File 'lib/ruote/dashboard.rb', line 1317

def []=(k, v)

  @storage.put_engine_variable(k, v)
end