Sha256: 3a69ad9a7ddfa53fe78470250c69b6d27ead2fd25512442853071dfca287d820

Contents?: true

Size: 600 Bytes

Versions: 16

Compression:

Stored size: 600 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)
        if other.is_a?(ProcessingMode)
          @mode == other.mode
        elsif other.is_a?(String)
          to_s == other
        else
          false
        end
      end

      def to_s
        @mode
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
meibo-0.16.0 lib/meibo/manifest/processing_mode.rb
meibo-0.15.0 lib/meibo/manifest/processing_mode.rb
meibo-0.14.0 lib/meibo/manifest/processing_mode.rb
meibo-0.13.0 lib/meibo/manifest/processing_mode.rb
meibo-0.12.0 lib/meibo/manifest/processing_mode.rb
meibo-0.11.0 lib/meibo/manifest/processing_mode.rb
meibo-0.10.0 lib/meibo/manifest/processing_mode.rb
meibo-0.9.0 lib/meibo/manifest/processing_mode.rb
meibo-0.8.0 lib/meibo/manifest/processing_mode.rb
meibo-0.7.0 lib/meibo/manifest/processing_mode.rb
meibo-0.6.0 lib/meibo/manifest/processing_mode.rb
meibo-0.5.0 lib/meibo/manifest/processing_mode.rb
meibo-0.4.0 lib/meibo/manifest/processing_mode.rb
meibo-0.3.0 lib/meibo/manifest/processing_mode.rb
meibo-0.2.0 lib/meibo/manifest/processing_mode.rb
meibo-0.1.0 lib/meibo/manifest/processing_mode.rb