Module: AutomationObject::StepDefinitions::Cache

Extended by:
Cache
Included in:
Cache
Defined in:
lib/automation_object/step_definitions/support/cache.rb

Overview

Cache module for temporary storage of vars

Instance Method Summary collapse

Instance Method Details

#get(key) ⇒ Object

Returns:

  • (Object)


16
17
18
# File 'lib/automation_object/step_definitions/support/cache.rb', line 16

def get(key)
  values[key]
end

#set(key, value) ⇒ void

This method returns an undefined value.

Parameters:

  • key (Object)
  • value (Object)


23
24
25
# File 'lib/automation_object/step_definitions/support/cache.rb', line 23

def set(key, value)
  values[key] = value
end

#valuesHash

Singleton hash, create new if needed

Returns:

  • (Hash)

    hash of values saved or new hash



11
12
13
# File 'lib/automation_object/step_definitions/support/cache.rb', line 11

def values
  @values ||= {}
end