Class: Rainbow::NullPresenter
- Inherits:
-
String
- Object
- String
- Rainbow::NullPresenter
show all
- Defined in:
- lib/rainbow/null_presenter.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args) ⇒ Object
75
76
77
78
79
80
81
|
# File 'lib/rainbow/null_presenter.rb', line 75
def method_missing(method_name, *args)
if Color::X11Named.color_names.include?(method_name) && args.empty?
self
else
super
end
end
|
Instance Method Details
#background(*_values) ⇒ Object
Also known as:
bg
7
8
9
|
# File 'lib/rainbow/null_presenter.rb', line 7
def background(*_values)
self
end
|
#black ⇒ Object
43
44
45
|
# File 'lib/rainbow/null_presenter.rb', line 43
def black
self
end
|
#blink ⇒ Object
31
32
33
|
# File 'lib/rainbow/null_presenter.rb', line 31
def blink
self
end
|
#blue ⇒ Object
59
60
61
|
# File 'lib/rainbow/null_presenter.rb', line 59
def blue
self
end
|
#bright ⇒ Object
Also known as:
bold
15
16
17
|
# File 'lib/rainbow/null_presenter.rb', line 15
def bright
self
end
|
#color(*_values) ⇒ Object
Also known as:
foreground, fg
3
4
5
|
# File 'lib/rainbow/null_presenter.rb', line 3
def color(*_values)
self
end
|
#cyan ⇒ Object
67
68
69
|
# File 'lib/rainbow/null_presenter.rb', line 67
def cyan
self
end
|
#faint ⇒ Object
Also known as:
dark
19
20
21
|
# File 'lib/rainbow/null_presenter.rb', line 19
def faint
self
end
|
#green ⇒ Object
51
52
53
|
# File 'lib/rainbow/null_presenter.rb', line 51
def green
self
end
|
#hide ⇒ Object
39
40
41
|
# File 'lib/rainbow/null_presenter.rb', line 39
def hide
self
end
|
#inverse ⇒ Object
35
36
37
|
# File 'lib/rainbow/null_presenter.rb', line 35
def inverse
self
end
|
#italic ⇒ Object
23
24
25
|
# File 'lib/rainbow/null_presenter.rb', line 23
def italic
self
end
|
#magenta ⇒ Object
63
64
65
|
# File 'lib/rainbow/null_presenter.rb', line 63
def magenta
self
end
|
#red ⇒ Object
47
48
49
|
# File 'lib/rainbow/null_presenter.rb', line 47
def red
self
end
|
#reset ⇒ Object
11
12
13
|
# File 'lib/rainbow/null_presenter.rb', line 11
def reset
self
end
|
#respond_to_missing?(method_name, *args) ⇒ Boolean
83
84
85
|
# File 'lib/rainbow/null_presenter.rb', line 83
def respond_to_missing?(method_name, *args)
Color::X11Named.color_names.include?(method_name) && args.empty? || super
end
|
#underline ⇒ Object
27
28
29
|
# File 'lib/rainbow/null_presenter.rb', line 27
def underline
self
end
|
#white ⇒ Object
71
72
73
|
# File 'lib/rainbow/null_presenter.rb', line 71
def white
self
end
|
#yellow ⇒ Object
55
56
57
|
# File 'lib/rainbow/null_presenter.rb', line 55
def yellow
self
end
|