Class: Iro::Alert

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Document, Mongoid::Timestamps
Defined in:
app/models/iro/alert.rb

Constant Summary collapse

SLEEP_TIME_SECONDS =
Rails.env.production? ? 60 : 15
DIRECTION_ABOVE =
'ABOVE'
DIRECTION_BELOW =
'BELOW'
STATUS_ACTIVE =
'active'
STATUS_INACTIVE =
'inactive'
STATUSES =
[ nil, 'active', 'inactive' ]

Class Method Summary collapse

Class Method Details

.activeObject



19
20
21
# File 'app/models/iro/alert.rb', line 19

def self.active
  where( status: STATUS_ACTIVE )
end

.directions_listObject



11
12
13
# File 'app/models/iro/alert.rb', line 11

def self.directions_list
  [ nil, DIRECTION_ABOVE, DIRECTION_BELOW ]
end