Class: Stupidedi::Color::Wrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/stupidedi/color.rb

Instance Method Summary collapse

Constructor Details

#initialize(base) ⇒ Wrapper


36
37
38
# File 'lib/stupidedi/color.rb', line 36

def initialize(base)
  @base = base
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) (private)


90
91
92
# File 'lib/stupidedi/color.rb', line 90

def method_missing(name, *args)
  @base.__send__(name, *args)
end

Instance Method Details

#composite(string)


68
69
70
# File 'lib/stupidedi/color.rb', line 68

def composite(string)
  black(string)
end

#element(string)


48
49
50
# File 'lib/stupidedi/color.rb', line 48

def element(string)
  black(string)
end

#envelope(string)


84
85
86
# File 'lib/stupidedi/color.rb', line 84

def envelope(string)
  yellow(string)
end

#forbidden(string)


60
61
62
# File 'lib/stupidedi/color.rb', line 60

def forbidden(string)
  noop(string)
end

#invalid(string)


44
45
46
# File 'lib/stupidedi/color.rb', line 44

def invalid(string)
  red(bold(string))
end

#loop(string)


76
77
78
# File 'lib/stupidedi/color.rb', line 76

def loop(string)
  yellow(string)
end

#noop(string)


40
41
42
# File 'lib/stupidedi/color.rb', line 40

def noop(string)
  string
end

#optional(string)


56
57
58
# File 'lib/stupidedi/color.rb', line 56

def optional(string)
  dark(white(string))
end

#repeated(string)


64
65
66
# File 'lib/stupidedi/color.rb', line 64

def repeated(string)
  black(string)
end

#required(string)


52
53
54
# File 'lib/stupidedi/color.rb', line 52

def required(string)
  bold(string)
end

#segment(string)


72
73
74
# File 'lib/stupidedi/color.rb', line 72

def segment(string)
  magenta(string)
end

#table(string)


80
81
82
# File 'lib/stupidedi/color.rb', line 80

def table(string)
  yellow(string)
end