Class: Ruote::EngineVariables

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

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