Module: SpreeCmCommissioner::Transit::TaxonBitwise

Extended by:
ActiveSupport::Concern
Defined in:
app/controllers/concerns/spree_cm_commissioner/transit/taxon_bitwise.rb

Constant Summary collapse

BIT_STOP =
0b001
BIT_STATION =
0b010
BIT_BRANCH =
0b100
BIT_LOCATION =
0b1000

Instance Method Summary collapse

Instance Method Details

#branch?Boolean



25
26
27
# File 'app/controllers/concerns/spree_cm_commissioner/transit/taxon_bitwise.rb', line 25

def branch?
  data_type & BIT_BRANCH != 0
end

#location?Boolean



29
30
31
# File 'app/controllers/concerns/spree_cm_commissioner/transit/taxon_bitwise.rb', line 29

def location?
  data_type & BIT_LOCATION != 0
end

#station?Boolean



21
22
23
# File 'app/controllers/concerns/spree_cm_commissioner/transit/taxon_bitwise.rb', line 21

def station?
  data_type & BIT_STATION != 0
end

#stop?Boolean



17
18
19
# File 'app/controllers/concerns/spree_cm_commissioner/transit/taxon_bitwise.rb', line 17

def stop?
  data_type & BIT_STOP != 0
end