Sha256: 1646f0b2ae7bcba2d88b34097a3721df0d20b1ac6d1a30fd5470183aa182355b

Contents?: true

Size: 531 Bytes

Versions: 16

Compression:

Stored size: 531 Bytes

Contents

require "license_acceptance/strategy/base"

module LicenseAcceptance
  module Strategy

    # Used for library consumers to parse their own form of acceptance (knife config, omnibus config, etc.) and pass it in
    class ProvidedValue < Base
      attr_reader :value

      def initialize(value)
        @value = value
      end

      def accepted?
        value == ACCEPT
      end

      def silent?
        value == ACCEPT_SILENT
      end

      def no_persist?
        value == ACCEPT_NO_PERSIST
      end
    end

  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
license-acceptance-2.0.0 lib/license_acceptance/strategy/provided_value.rb
license-acceptance-1.0.19 lib/license_acceptance/strategy/provided_value.rb
license-acceptance-1.0.18 lib/license_acceptance/strategy/provided_value.rb
license-acceptance-1.0.13 lib/license_acceptance/strategy/provided_value.rb
license-acceptance-1.0.12 lib/license_acceptance/strategy/provided_value.rb
license-acceptance-1.0.11 lib/license_acceptance/strategy/provided_value.rb
license-acceptance-1.0.8 lib/license_acceptance/strategy/provided_value.rb
license-acceptance-1.0.7 lib/license_acceptance/strategy/provided_value.rb
license-acceptance-1.0.6 lib/license_acceptance/strategy/provided_value.rb
license-acceptance-1.0.5 lib/license_acceptance/strategy/provided_value.rb
license-acceptance-1.0.3 lib/license_acceptance/strategy/provided_value.rb
license-acceptance-1.0.2 lib/license_acceptance/strategy/provided_value.rb
license-acceptance-1.0.0 lib/license_acceptance/strategy/provided_value.rb
license-acceptance-0.2.16 lib/license_acceptance/strategy/provided_value.rb
license-acceptance-0.2.15 lib/license_acceptance/strategy/provided_value.rb
license-acceptance-0.2.13 lib/license_acceptance/strategy/provided_value.rb