Module: LitaGhostInspector::Utility

Included in:
Lita::Handlers::GhostInspectorSuites, Lita::Handlers::GhostInspectorTests
Defined in:
lib/lita-ghost-inspector/utility.rb

Instance Method Summary collapse

Instance Method Details

#seconds_to_human(seconds) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/lita-ghost-inspector/utility.rb', line 3

def seconds_to_human(seconds)
  {
    seconds => "every #{seconds} seconds",
    86400 => "daily",
    3600 => "hourly",
    1800 => "every 30 minutes",
    900 => "every 15 minutes",
    300 => "every 5 minutes",
    0 => "never"
  }[seconds]
end