Class: Colorlib::ColorAttribute

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeColorAttribute

Returns a new instance of ColorAttribute.



6
7
8
9
10
11
# File 'lib/colorlib/color_attribute.rb', line 6

def initialize
  @color = :default
  @bold = false
  @underline = false
  @italic = false
end

Instance Attribute Details

#boldObject

Returns the value of attribute bold.



4
5
6
# File 'lib/colorlib/color_attribute.rb', line 4

def bold
  @bold
end

#colorObject

Returns the value of attribute color.



4
5
6
# File 'lib/colorlib/color_attribute.rb', line 4

def color
  @color
end

#italicObject

Returns the value of attribute italic.



4
5
6
# File 'lib/colorlib/color_attribute.rb', line 4

def italic
  @italic
end

#underlineObject

Returns the value of attribute underline.



4
5
6
# File 'lib/colorlib/color_attribute.rb', line 4

def underline
  @underline
end