Class: Weechat::Color
Overview
This class represents a Weechat color.
It is created from a color name and saves that name and the color representation.
Instance Attribute Summary collapse
-
#color ⇒ Object
readonly
Returns the value of attribute color.
- #name ⇒ Object readonly
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(name) ⇒ Color
constructor
A new instance of Color.
- #to_s ⇒ Object (also: #to_str)
- #to_weechat_config ⇒ Object
Constructor Details
Instance Attribute Details
#color ⇒ Object (readonly)
Returns the value of attribute color.
13 14 15 |
# File 'lib/weechat/color.rb', line 13 def color @color end |
Class Method Details
.from_weechat_config(v) ⇒ Object
7 8 9 |
# File 'lib/weechat/color.rb', line 7 def self.from_weechat_config(v) new(v) end |
Instance Method Details
#==(other) ⇒ Object
28 29 30 |
# File 'lib/weechat/color.rb', line 28 def ==(other) @name == other.name end |
#to_s ⇒ Object Also known as: to_str
19 20 21 |
# File 'lib/weechat/color.rb', line 19 def to_s @color end |
#to_weechat_config ⇒ Object
24 25 26 |
# File 'lib/weechat/color.rb', line 24 def to_weechat_config @name end |