Class: Gradient::OpacityPoint
- Inherits:
-
Object
- Object
- Gradient::OpacityPoint
- Defined in:
- lib/gradient/opacity_point.rb
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#opacity ⇒ Object
readonly
Returns the value of attribute opacity.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(location, opacity) ⇒ OpacityPoint
constructor
A new instance of OpacityPoint.
Constructor Details
#initialize(location, opacity) ⇒ OpacityPoint
Returns a new instance of OpacityPoint.
4 5 6 |
# File 'lib/gradient/opacity_point.rb', line 4 def initialize(location, opacity) @location, @opacity = location, opacity end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
3 4 5 |
# File 'lib/gradient/opacity_point.rb', line 3 def location @location end |
#opacity ⇒ Object (readonly)
Returns the value of attribute opacity.
3 4 5 |
# File 'lib/gradient/opacity_point.rb', line 3 def opacity @opacity end |
Instance Method Details
#<=>(other) ⇒ Object
7 8 9 |
# File 'lib/gradient/opacity_point.rb', line 7 def <=>(other) self.location <=> other.location end |