Class: Jan::Symbol::Band
- Inherits:
-
Object
- Object
- Jan::Symbol::Band
- Defined in:
- lib/jan/symbol/band.rb,
lib/jan/symbol/band/bar.rb,
lib/jan/symbol/band/space.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#color ⇒ Object
readonly
Returns the value of attribute color.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
- #==(other) ⇒ boolean
-
#initialize(width, color:) ⇒ Band
constructor
A new instance of Band.
Constructor Details
#initialize(width, color:) ⇒ Band
Returns a new instance of Band.
9 10 11 12 |
# File 'lib/jan/symbol/band.rb', line 9 def initialize(width, color:) @width = width @color = color end |
Instance Attribute Details
#color ⇒ Object (readonly)
Returns the value of attribute color.
14 15 16 |
# File 'lib/jan/symbol/band.rb', line 14 def color @color end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
14 15 16 |
# File 'lib/jan/symbol/band.rb', line 14 def width @width end |
Instance Method Details
#==(other) ⇒ boolean
18 19 20 |
# File 'lib/jan/symbol/band.rb', line 18 def ==(other) self.width == other.width && self.color == other.color end |