Sha256: 8e38ec15e6b82cfe1953a4281545fcaf76c109903e707ce158b9f3c2de343c96

Contents?: true

Size: 390 Bytes

Versions: 5

Compression:

Stored size: 390 Bytes

Contents

# frozen_string_literal: true

module RubyGitCrypt
  module Options
    module Types
      class Flag < ImmutableStruct.new(
        :name,
        :value
      )
        def initialize(name, value, **_opts)
          super(name: name, value: 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_git_crypt-0.1.0.pre.5 lib/ruby_git_crypt/options/types/flag.rb
ruby_git_crypt-0.1.0.pre.4 lib/ruby_git_crypt/options/types/flag.rb
ruby_git_crypt-0.1.0.pre.3 lib/ruby_git_crypt/options/types/flag.rb
ruby_git_crypt-0.1.0.pre.2 lib/ruby_git_crypt/options/types/flag.rb
ruby_git_crypt-0.1.0.pre.1 lib/ruby_git_crypt/options/types/flag.rb