Class: Ric::Colors::RicColor
- Inherits:
-
String
- Object
- String
- Ric::Colors::RicColor
- Defined in:
- lib/ric/colors.rb
Instance Attribute Summary collapse
-
#color ⇒ Object
readonly
Returns the value of attribute color.
Instance Method Summary collapse
-
#initialize(mycol) ⇒ RicColor
constructor
A new instance of RicColor.
- #to_html ⇒ Object
-
#to_s ⇒ Object
shouold become context sensitive…
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
#color ⇒ Object (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_html ⇒ Object
268 269 270 |
# File 'lib/ric/colors.rb', line 268 def to_html "<font color=\"#{@color}\" >#{self}</font>" end |
#to_s ⇒ Object
shouold become context sensitive…
264 265 266 |
# File 'lib/ric/colors.rb', line 264 def to_s 'RicColor: ' + self.send(@color) end |