Class: Meibo::Manifest::ProcessingMode

Inherits:
Object
  • Object
show all
Defined in:
lib/meibo/manifest/processing_mode.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mode) ⇒ ProcessingMode

Returns a new instance of ProcessingMode.



8
9
10
11
# File 'lib/meibo/manifest/processing_mode.rb', line 8

def initialize(mode)
  @mode = mode
  freeze
end

Instance Attribute Details

#modeObject (readonly)

Returns the value of attribute mode.



6
7
8
# File 'lib/meibo/manifest/processing_mode.rb', line 6

def mode
  @mode
end

Instance Method Details

#==(other) ⇒ Object



25
26
27
28
29
30
31
32
33
34
# File 'lib/meibo/manifest/processing_mode.rb', line 25

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

#absent?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/meibo/manifest/processing_mode.rb', line 13

def absent?
  @mode == "absent"
end

#bulk?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/meibo/manifest/processing_mode.rb', line 17

def bulk?
  @mode == "bulk"
end

#delta?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/meibo/manifest/processing_mode.rb', line 21

def delta?
  @mode == "delta"
end

#to_sObject



36
37
38
# File 'lib/meibo/manifest/processing_mode.rb', line 36

def to_s
  @mode
end