Sha256: 2010943c9ec379d95692182a3994098e0e06e95eb752b276e5d01e547d5f1afa

Contents?: true

Size: 374 Bytes

Versions: 7

Compression:

Stored size: 374 Bytes

Contents

# frozen_string_literal: true

module RubyNPM
  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

7 entries across 7 versions & 1 rubygems

Version Path
ruby_npm-0.2.0.pre.2 lib/ruby_npm/options/types/flag.rb
ruby_npm-0.2.0.pre.1 lib/ruby_npm/options/types/flag.rb
ruby_npm-0.1.0 lib/ruby_npm/options/types/flag.rb
ruby_npm-0.1.0.pre.14 lib/ruby_npm/options/types/flag.rb
ruby_npm-0.1.0.pre.13 lib/ruby_npm/options/types/flag.rb
ruby_npm-0.1.0.pre.12 lib/ruby_npm/options/types/flag.rb
ruby_npm-0.1.0.pre.11 lib/ruby_npm/options/types/flag.rb