Sha256: 7d8e6bb5a697ca0c7c977156c1e2425e9fcc76a79ad442420723dce423a8894b

Contents?: true

Size: 420 Bytes

Versions: 20

Compression:

Stored size: 420 Bytes

Contents

# frozen_string_literal: true

require 'immutable-struct'

module RubyVault
  module Options
    module Values
      class KeyValue < ImmutableStruct.new(:key, :value)
        def initialize(key, value)
          super(key: key, value: value)
        end

        def resolve
          { key => value.resolve }
        end

        def render
          "'#{key}=#{value.render}'"
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
ruby_vault-0.2.0.pre.4 lib/ruby_vault/options/values/key_value.rb
ruby_vault-0.2.0.pre.3 lib/ruby_vault/options/values/key_value.rb
ruby_vault-0.2.0.pre.2 lib/ruby_vault/options/values/key_value.rb
ruby_vault-0.2.0.pre.1 lib/ruby_vault/options/values/key_value.rb
ruby_vault-0.1.0 lib/ruby_vault/options/values/key_value.rb
ruby_vault-0.1.0.pre.18 lib/ruby_vault/options/values/key_value.rb
ruby_vault-0.1.0.pre.17 lib/ruby_vault/options/values/key_value.rb
ruby_vault-0.1.0.pre.16 lib/ruby_vault/options/values/key_value.rb
ruby_vault-0.1.0.pre.15 lib/ruby_vault/options/values/key_value.rb
ruby_vault-0.1.0.pre.14 lib/ruby_vault/options/values/key_value.rb
ruby_vault-0.1.0.pre.13 lib/ruby_vault/options/values/key_value.rb
ruby_vault-0.1.0.pre.12 lib/ruby_vault/options/values/key_value.rb
ruby_vault-0.1.0.pre.11 lib/ruby_vault/options/values/key_value.rb
ruby_vault-0.1.0.pre.10 lib/ruby_vault/options/values/key_value.rb
ruby_vault-0.1.0.pre.9 lib/ruby_vault/options/values/key_value.rb
ruby_vault-0.1.0.pre.8 lib/ruby_vault/options/values/key_value.rb
ruby_vault-0.1.0.pre.7 lib/ruby_vault/options/values/key_value.rb
ruby_vault-0.1.0.pre.6 lib/ruby_vault/options/values/key_value.rb
ruby_vault-0.1.0.pre.5 lib/ruby_vault/options/values/key_value.rb
ruby_vault-0.1.0.pre.4 lib/ruby_vault/options/values/key_value.rb