Class: Stupidedi::Color::Wrapper

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

Instance Method Summary collapse

Constructor Details

#initialize(base) ⇒ Wrapper

Returns a new instance of Wrapper.



33
34
35
# File 'lib/stupidedi/color.rb', line 33

def initialize(base)
  @base = base
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object (private)



87
88
89
# File 'lib/stupidedi/color.rb', line 87

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

Instance Method Details

#composite(string) ⇒ Object



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

def composite(string)
  black(string)
end

#element(string) ⇒ Object



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

def element(string)
  black(string)
end

#envelope(string) ⇒ Object



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

def envelope(string)
  yellow(string)
end

#forbidden(string) ⇒ Object



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

def forbidden(string)
  noop(string)
end

#invalid(string) ⇒ Object



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

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

#loop(string) ⇒ Object



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

def loop(string)
  yellow(string)
end

#noop(string) ⇒ Object



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

def noop(string)
  string
end

#optional(string) ⇒ Object



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

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

#repeated(string) ⇒ Object



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

def repeated(string)
  black(string)
end

#required(string) ⇒ Object



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

def required(string)
  bold(string)
end

#segment(string) ⇒ Object



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

def segment(string)
  magenta(string)
end

#table(string) ⇒ Object



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

def table(string)
  yellow(string)
end