Module: Services::StatusMasking
- Defined in:
- app/controllers/services/status_masking.rb
Constant Summary collapse
- STATUS_MASK =
0x0f
- NEGATE_MASK =
0x10
Instance Method Summary collapse
Instance Method Details
#determine_status_operator(status_param) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'app/controllers/services/status_masking.rb', line 7 def determine_status_operator(status_param) return [] if status_param.nil? raw_status = status_param.to_i status = raw_status & STATUS_MASK operator = (raw_status & NEGATE_MASK) != 0 ? "!=" : "=" [ status, operator ] end |