Class: Rainbow::NullPresenter

Inherits:
String
  • Object
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

#blackObject



15
# File 'lib/rainbow/null_presenter.rb', line 15

def black; self; end


11
# File 'lib/rainbow/null_presenter.rb', line 11

def blink; self; end

#blueObject



19
# File 'lib/rainbow/null_presenter.rb', line 19

def blue; self; end

#brightObject



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

#cyanObject



21
# File 'lib/rainbow/null_presenter.rb', line 21

def cyan; self; end

#greenObject



17
# File 'lib/rainbow/null_presenter.rb', line 17

def green; self; end

#hideObject



13
# File 'lib/rainbow/null_presenter.rb', line 13

def hide; self; end

#inverseObject



12
# File 'lib/rainbow/null_presenter.rb', line 12

def inverse; self; end

#italicObject



9
# File 'lib/rainbow/null_presenter.rb', line 9

def italic; self; end

#magentaObject



20
# File 'lib/rainbow/null_presenter.rb', line 20

def magenta; self; end

#redObject



16
# File 'lib/rainbow/null_presenter.rb', line 16

def red; self; end

#resetObject



7
# File 'lib/rainbow/null_presenter.rb', line 7

def reset; self; end

#underlineObject



10
# File 'lib/rainbow/null_presenter.rb', line 10

def underline; self; end

#whiteObject



22
# File 'lib/rainbow/null_presenter.rb', line 22

def white; self; end

#yellowObject



18
# File 'lib/rainbow/null_presenter.rb', line 18

def yellow; self; end