Class: Ric::Colors::RicColor

Inherits:
String
  • Object
show all
Defined in:
lib/ric/colors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mycol) ⇒ RicColor

Returns a new instance of RicColor.



258
259
260
261
# File 'lib/ric/colors.rb', line 258

def initialize(mycol)
  super
  @color = mycol
end

Instance Attribute Details

#colorObject (readonly)

Returns the value of attribute color.



256
257
258
# File 'lib/ric/colors.rb', line 256

def color
  @color
end

Instance Method Details

#to_htmlObject



268
269
270
# File 'lib/ric/colors.rb', line 268

def to_html
  "<font color=\"#{@color}\" >#{self}</font>"
end

#to_sObject

shouold become context sensitive…



264
265
266
# File 'lib/ric/colors.rb', line 264

def to_s
  'RicColor: ' + self.send(@color)
end