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

- (EngineVariables) initialize(storage)



1339
1340
1341
1342
# File 'lib/ruote/dashboard.rb', line 1339

def initialize(storage)

  @storage = storage
end

Instance Method Details

- (Object) [](k)



1344
1345
1346
1347
# File 'lib/ruote/dashboard.rb', line 1344

def [](k)

  @storage.get_engine_variable(k)
end

- (Object) []=(k, v)



1349
1350
1351
1352
# File 'lib/ruote/dashboard.rb', line 1349

def []=(k, v)

  @storage.put_engine_variable(k, v)
end