Class: Notifaction::Type::Terminal

Inherits:
Base
  • Object
show all
Defined in:
lib/notifaction/types/terminal.rb

Constant Summary

Constants inherited from Base

Base::OK, Base::QUIT, Base::QUIT_SOFT

Instance Attribute Summary

Attributes inherited from Base

#user_conf

Instance Method Summary collapse

Methods inherited from Base

#fire_hooks, #initialize, #ok, #quit, #quit_ok, #quit_soft

Constructor Details

This class inherits a constructor from Notifaction::Type::Base

Instance Method Details

#error(message, config) ⇒ Object

Since:

  • 0.2.8



6
7
8
9
# File 'lib/notifaction/types/terminal.rb', line 6

def error(message, config)
  config[:symbol] = "\u2716"
  inline(message, config, :red)
end

#info(message, config) ⇒ Object

Since:

  • 0.2.8



27
28
29
30
# File 'lib/notifaction/types/terminal.rb', line 27

def info(message, config)
  config[:symbol] = "\u2011"
  inline(message, config, :blue)
end

#note(message, config) ⇒ Object

Since:

  • 0.2.8



42
43
44
45
# File 'lib/notifaction/types/terminal.rb', line 42

def note(message, config)
  config[:symbol] = "\u2011"
  inline(message, config, :cyan)
end

#sinfo(message, config) ⇒ Object

Since:

  • 0.2.8



34
35
36
37
38
# File 'lib/notifaction/types/terminal.rb', line 34

def sinfo(message, config)
  deprecation_notice("0.2.8")

  note(message, config, :cyan)
end

#spacer(config) ⇒ Object

Since:

  • 0.2.8



56
57
58
59
# File 'lib/notifaction/types/terminal.rb', line 56

def spacer(config)
  config[:symbol] = "\u2011"
  inline("=============", config, :magenta)
end

#spit(message, config) ⇒ Object

Since:

  • 0.2.8



49
50
51
52
# File 'lib/notifaction/types/terminal.rb', line 49

def spit(message, config)
  config[:fancy] = false
  inline(message, config)
end

#success(message, config) ⇒ Object

Since:

  • 0.2.8



20
21
22
23
# File 'lib/notifaction/types/terminal.rb', line 20

def success(message, config)
  config[:symbol] = "\u2713"
  inline(message, config, :green)
end

#warning(message, config) ⇒ Object

Since:

  • 0.2.8



13
14
15
16
# File 'lib/notifaction/types/terminal.rb', line 13

def warning(message, config)
  config[:symbol] = "\u2011"
  inline(message, config, :yellow)
end