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
24
25
26
27
28
29
30
|
# File 'lib/rainbow/null_presenter.rb', line 24
def method_missing(method_name,*args)
if Color::X11Named.color_names.include? method_name and args.empty? then
self
else
super
end
end
|
Instance Method Details
#background(*values) ⇒ Object
Also known as:
bg
6
|
# File 'lib/rainbow/null_presenter.rb', line 6
def background(*values); self; end
|
#black ⇒ Object
15
|
# File 'lib/rainbow/null_presenter.rb', line 15
def black; self; end
|
#blink ⇒ Object
11
|
# File 'lib/rainbow/null_presenter.rb', line 11
def blink; self; end
|
#blue ⇒ Object
19
|
# File 'lib/rainbow/null_presenter.rb', line 19
def blue; self; end
|
#bright ⇒ Object
8
|
# File 'lib/rainbow/null_presenter.rb', line 8
def bright; self; end
|
#color(*values) ⇒ Object
Also known as:
foreground, fg
5
|
# File 'lib/rainbow/null_presenter.rb', line 5
def color(*values); self; end
|
#cyan ⇒ Object
21
|
# File 'lib/rainbow/null_presenter.rb', line 21
def cyan; self; end
|
#green ⇒ Object
17
|
# File 'lib/rainbow/null_presenter.rb', line 17
def green; self; end
|
#hide ⇒ Object
13
|
# File 'lib/rainbow/null_presenter.rb', line 13
def hide; self; end
|
#inverse ⇒ Object
12
|
# File 'lib/rainbow/null_presenter.rb', line 12
def inverse; self; end
|
#italic ⇒ Object
9
|
# File 'lib/rainbow/null_presenter.rb', line 9
def italic; self; end
|
#magenta ⇒ Object
20
|
# File 'lib/rainbow/null_presenter.rb', line 20
def magenta; self; end
|
#red ⇒ Object
16
|
# File 'lib/rainbow/null_presenter.rb', line 16
def red; self; end
|
#reset ⇒ Object
7
|
# File 'lib/rainbow/null_presenter.rb', line 7
def reset; self; end
|
#underline ⇒ Object
10
|
# File 'lib/rainbow/null_presenter.rb', line 10
def underline; self; end
|
#white ⇒ Object
22
|
# File 'lib/rainbow/null_presenter.rb', line 22
def white; self; end
|
#yellow ⇒ Object
18
|
# File 'lib/rainbow/null_presenter.rb', line 18
def yellow; self; end
|