Sha256: 799aa00d1a258f1a36baa0bb31110fa932aca911a79db8438bc3a7f802eb997b

Contents?: true

Size: 376 Bytes

Versions: 5

Compression:

Stored size: 376 Bytes

Contents

# frozen_string_literal: true

module RubyVault
  module Options
    module Types
      class Flag < ImmutableStruct.new(
        :name,
        :value
      )
        def initialize(name, value, **_opts)
          super(name:, value:)
        end

        def apply(builder)
          value.resolve ? builder.with_flag(name) : builder
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ruby_vault-0.3.0.pre.2 lib/ruby_vault/options/types/flag.rb
ruby_vault-0.3.0.pre.1 lib/ruby_vault/options/types/flag.rb
ruby_vault-0.2.0 lib/ruby_vault/options/types/flag.rb
ruby_vault-0.2.0.pre.6 lib/ruby_vault/options/types/flag.rb
ruby_vault-0.2.0.pre.5 lib/ruby_vault/options/types/flag.rb