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



25
26
27
28
29
30
31
# File 'lib/rainbow/null_presenter.rb', line 25

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



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

def black; self; end


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

def blink; self; end

#blueObject



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

def blue; self; end

#brightObject Also known as: bold



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



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

def cyan; self; end

#faintObject Also known as: dark



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

def faint; self; end

#greenObject



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

def green; self; end

#hideObject



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

def hide; self; end

#inverseObject



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

def inverse; self; end

#italicObject



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

def italic; self; end

#magentaObject



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

def magenta; self; end

#redObject



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

def red; self; end

#resetObject



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

def reset; self; end

#underlineObject



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

def underline; self; end

#whiteObject



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

def white; self; end

#yellowObject



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

def yellow; self; end