Module: VariableHelpers

Defined in:
lib/potassium/templates/application/helpers/variable-helpers.rb

Instance Method Summary collapse

Instance Method Details

#equals?(key, value) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/potassium/templates/application/helpers/variable-helpers.rb', line 12

def equals?(key, value)
  get(key) == value
end

#get(key) ⇒ Object



7
8
9
10
# File 'lib/potassium/templates/application/helpers/variable-helpers.rb', line 7

def get(key)
  @_data ||= {}
  @_data[key]
end

#set(key, value) ⇒ Object



2
3
4
5
# File 'lib/potassium/templates/application/helpers/variable-helpers.rb', line 2

def set(key, value)
  @_data ||= {}
  @_data[key] = value
end