Sha256: 9dcb56c72e271058492956e9dc8d9cfdf6c130d1dadad17661879a73b05cafb7

Contents?: true

Size: 266 Bytes

Versions: 1

Compression:

Stored size: 266 Bytes

Contents

class EnvKeyStore
  def initialize(key)
    @key = "SEVEN_TEST_#{key}"

    @store = ENV[@key]
  end

  def get(fallback = nil)
    @store.nil? ? fallback : @store
  end

  def set(val, only_on_nil = false)
    @store = val unless only_on_nil
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
seven_api-0.5.0 spec/EnvKeyStore.rb