Sha256: 0d757ac91078f71441523a33f7e5c234689d80905f95601d07e757273a811766

Contents?: true

Size: 594 Bytes

Versions: 15

Compression:

Stored size: 594 Bytes

Contents

# frozen_string_literal: true

module Meibo
  class Manifest
    class ProcessingMode
      attr_reader :mode

      def initialize(mode)
        @mode = mode
        freeze
      end

      def absent?
        @mode == "absent"
      end

      def bulk?
        @mode == "bulk"
      end

      def delta?
        @mode == "delta"
      end

      def ==(other)
        case other
        when ProcessingMode
          @mode == other.mode
        when String
          to_s == other
        else
          false
        end
      end

      def to_s
        @mode
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
meibo-0.27.1 lib/meibo/manifest/processing_mode.rb
meibo-0.27.0 lib/meibo/manifest/processing_mode.rb
meibo-0.26.0 lib/meibo/manifest/processing_mode.rb
meibo-0.25.3 lib/meibo/manifest/processing_mode.rb
meibo-0.25.2 lib/meibo/manifest/processing_mode.rb
meibo-0.25.1 lib/meibo/manifest/processing_mode.rb
meibo-0.25.0 lib/meibo/manifest/processing_mode.rb
meibo-0.24.0 lib/meibo/manifest/processing_mode.rb
meibo-0.23.0 lib/meibo/manifest/processing_mode.rb
meibo-0.22.0 lib/meibo/manifest/processing_mode.rb
meibo-0.21.0 lib/meibo/manifest/processing_mode.rb
meibo-0.20.0 lib/meibo/manifest/processing_mode.rb
meibo-0.19.0 lib/meibo/manifest/processing_mode.rb
meibo-0.18.0 lib/meibo/manifest/processing_mode.rb
meibo-0.17.0 lib/meibo/manifest/processing_mode.rb