Class: Guard::Notifier::Blink1
- Inherits:
-
Base
- Object
- Base
- Guard::Notifier::Blink1
- Defined in:
- lib/guard/notifier/blink1.rb
Constant Summary collapse
- DEFAULT_METHODS =
{ success: "blink", pending: "blink", failed: "blink", notify: "blink", }.freeze
- DEFAULT_COLORS =
{ success: "#00ff00", pending: "#ffff00", failed: "#ff0000", notify: "#0000ff", }.freeze
- DEFAULT_COUNTS =
{ success: 3, pending: 3, failed: 3, notify: 3, }.freeze
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.available?(opts = {}) ⇒ Boolean
28 29 30 |
# File 'lib/guard/notifier/blink1.rb', line 28 def self.available?(opts = {}) super && command?("blink1-tool") end |
Instance Method Details
#notify(message, opts = {}) ⇒ Object
32 33 34 35 36 37 38 39 40 |
# File 'lib/guard/notifier/blink1.rb', line 32 def notify(, opts = {}) super method = fetch_config :method, opts, DEFAULT_METHODS color = fetch_config :color, opts, DEFAULT_COLORS count = fetch_config :count, opts, DEFAULT_COUNTS execute method, color, count end |