Class: Stupidedi::Color::Wrapper
- Inherits:
-
Object
- Object
- Stupidedi::Color::Wrapper
show all
- Defined in:
- lib/stupidedi/color.rb
Instance Method Summary
collapse
Constructor Details
#initialize(base) ⇒ Wrapper
Returns a new instance of Wrapper.
35
36
37
|
# File 'lib/stupidedi/color.rb', line 35
def initialize(base)
@base = base
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args)
89
90
91
|
# File 'lib/stupidedi/color.rb', line 89
def method_missing(name, *args)
@base.__send__(name, *args)
end
|
Instance Method Details
#composite(string)
67
68
69
|
# File 'lib/stupidedi/color.rb', line 67
def composite(string)
black(string)
end
|
#element(string)
47
48
49
|
# File 'lib/stupidedi/color.rb', line 47
def element(string)
black(string)
end
|
#envelope(string)
83
84
85
|
# File 'lib/stupidedi/color.rb', line 83
def envelope(string)
yellow(string)
end
|
#forbidden(string)
59
60
61
|
# File 'lib/stupidedi/color.rb', line 59
def forbidden(string)
noop(string)
end
|
#invalid(string)
43
44
45
|
# File 'lib/stupidedi/color.rb', line 43
def invalid(string)
red(bold(string))
end
|
#loop(string)
75
76
77
|
# File 'lib/stupidedi/color.rb', line 75
def loop(string)
yellow(string)
end
|
#noop(string)
39
40
41
|
# File 'lib/stupidedi/color.rb', line 39
def noop(string)
string
end
|
#optional(string)
55
56
57
|
# File 'lib/stupidedi/color.rb', line 55
def optional(string)
dark(white(string))
end
|
#repeated(string)
63
64
65
|
# File 'lib/stupidedi/color.rb', line 63
def repeated(string)
black(string)
end
|
#required(string)
51
52
53
|
# File 'lib/stupidedi/color.rb', line 51
def required(string)
bold(string)
end
|
#segment(string)
71
72
73
|
# File 'lib/stupidedi/color.rb', line 71
def segment(string)
magenta(string)
end
|
#table(string)
79
80
81
|
# File 'lib/stupidedi/color.rb', line 79
def table(string)
yellow(string)
end
|