Class: CTodo::Tag
- Inherits:
-
Object
- Object
- CTodo::Tag
- Defined in:
- lib/ctodo.rb
Instance Attribute Summary collapse
-
#color ⇒ Object
readonly
Returns the value of attribute color.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(title, color) ⇒ Tag
constructor
A new instance of Tag.
Constructor Details
#initialize(title, color) ⇒ Tag
Returns a new instance of Tag.
44 45 46 47 |
# File 'lib/ctodo.rb', line 44 def initialize(title, color) @title = title @color = color.to_i(16) end |
Instance Attribute Details
#color ⇒ Object (readonly)
Returns the value of attribute color.
42 43 44 |
# File 'lib/ctodo.rb', line 42 def color @color end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
42 43 44 |
# File 'lib/ctodo.rb', line 42 def title @title end |