Class: Stupidedi::Color::Wrapper

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

Instance Method Summary (collapse)

Constructor Details

- (Wrapper) initialize(base)



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) (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)



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

def composite(string)
  black(string)
end

- element(string)



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

def element(string)
  black(string)
end

- envelope(string)



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

def envelope(string)
  yellow(string)
end

- forbidden(string)



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

def forbidden(string)
  noop(string)
end

- invalid(string)



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

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

- loop(string)



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

def loop(string)
  yellow(string)
end

- noop(string)



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

def noop(string)
  string
end

- optional(string)



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

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

- repeated(string)



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

def repeated(string)
  black(string)
end

- required(string)



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

def required(string)
  bold(string)
end

- segment(string)



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

def segment(string)
  magenta(string)
end

- table(string)



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

def table(string)
  yellow(string)
end