Class: Notifu::Model::Sla

Inherits:
Ohm::Model
  • Object
show all
Defined in:
lib/notifu/model/sla.rb

Instance Method Summary collapse

Instance Method Details

#timerange_values(now = Time.now) ⇒ Object


12
13
14
15
16
# File 'lib/notifu/model/sla.rb', line 12

def timerange_values (now=Time.now)
  dow = now.wday - 1
  dow = 6 if dow < 0
  JSON.parse(self.timeranges)[dow]
end