module Travis::Tools::Notification
Constants
- DEFAULT
- ICON
Public Instance Methods
get(name)
click to toggle source
# File lib/travis/tools/notification.rb, line 20 def get(name) const = constants.detect { |c| c.to_s[/[^:]+$/].downcase == name.to_s } raise ArgumentError, "unknown notifications type %p" % name unless const const_get(const).new end
new(*list)
click to toggle source
# File lib/travis/tools/notification.rb, line 13 def new(*list) list.concat(DEFAULT) if list.empty? notification = list.map { |n| get(n) }.detect { |n| n.available? } raise ArgumentError, "no notification system found (looked for #{list.join(", ")})" unless notification notification end