Class: DebugLogger::Requires

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(color) ⇒ Requires

Returns a new instance of Requires.



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

def initialize(color)
  @color = color
end

Instance Attribute Details

#colorObject (readonly)

Returns the value of attribute color.



31
32
33
# File 'lib/debug_logger.rb', line 31

def color
  @color
end

Instance Method Details

#color_significationObject



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/debug_logger.rb', line 37

def color_signification
  case color
  when :black
    30
  when :red
    31
  when :green
    32
  when :orange
    33
  when :blue
    34
  when :pink
    35
  when :cyan
    36
  when :white
    37
  when :normal
    38
  when :bold
    1
  when :italic
    3
  when :underline
    4
  else
    38
  end
end