Sha256: dbf85b2a999b8be3add9d0dda9d27b8837b375cf71e0f81212c6b6f989cfdc15

Contents?: true

Size: 308 Bytes

Versions: 11

Compression:

Stored size: 308 Bytes

Contents

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

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

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

  private

  def ensure_variable(key, default_value)
    set(key, get(key) || default_value)
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
potassium-1.3.3 lib/potassium/templates/application/helpers/variable-helpers.rb
potassium-1.3.2 lib/potassium/templates/application/helpers/variable-helpers.rb
potassium-1.3.0 lib/potassium/templates/application/helpers/variable-helpers.rb
potassium-1.2.4 lib/potassium/templates/application/helpers/variable-helpers.rb
potassium-1.2.3 lib/potassium/templates/application/helpers/variable-helpers.rb
potassium-1.2.2 lib/potassium/templates/application/helpers/variable-helpers.rb
potassium-1.2.1 lib/potassium/templates/application/helpers/variable-helpers.rb
potassium-1.2.0 lib/potassium/templates/application/helpers/variable-helpers.rb
potassium-1.1.0 lib/potassium/templates/application/helpers/variable-helpers.rb
potassium-1.0.1 lib/potassium/templates/application/helpers/variable-helpers.rb
potassium-1.0.0 lib/potassium/templates/application/helpers/variable-helpers.rb