class Signaly::Config

Public Class Methods

default() click to toggle source
# File lib/signaly/config.rb, line 17
def self.default
  defaults = new
  # how many seconds between two checks of the site
  defaults.sleep_seconds = 60
  # if there is some pending content and I don't look at it,
  # remind me after X seconds
  defaults.remind_after = 60*5
  # for how long time the notification shows up
  defaults.notification_showtime = 10
  defaults.debug_output = false
  defaults.password = nil
  return defaults
end

Public Instance Methods

merge(other) click to toggle source

merges the config structs so that the last one in the argument list has the highest priority and value nil is considered empty

# File lib/signaly/config.rb, line 34
def merge(other)
  merged = dup

  merged.members.each do |key|
    merged[key] = other[key] if other[key]
  end

  return merged
end