Class: Rainbow::OpacityRanges
- Inherits:
-
Object
- Object
- Rainbow::OpacityRanges
- Extended by:
- Forwardable
- Defined in:
- lib/rainbow/opacity_ranges.rb
Instance Attribute Summary collapse
-
#current_x ⇒ Object
Returns the value of attribute current_x.
-
#gradient ⇒ Object
readonly
Returns the value of attribute gradient.
-
#ranges ⇒ Object
readonly
Returns the value of attribute ranges.
Instance Method Summary collapse
-
#initialize(opacity_ranges, gradient) ⇒ OpacityRanges
constructor
A new instance of OpacityRanges.
Constructor Details
#initialize(opacity_ranges, gradient) ⇒ OpacityRanges
Returns a new instance of OpacityRanges.
8 9 10 11 12 13 |
# File 'lib/rainbow/opacity_ranges.rb', line 8 def initialize(opacity_ranges, gradient) @ranges = opacity_ranges @gradient = gradient @ranges.each { |range| range.gradient = gradient } end |
Instance Attribute Details
#current_x ⇒ Object
Returns the value of attribute current_x.
6 7 8 |
# File 'lib/rainbow/opacity_ranges.rb', line 6 def current_x @current_x end |
#gradient ⇒ Object (readonly)
Returns the value of attribute gradient.
6 7 8 |
# File 'lib/rainbow/opacity_ranges.rb', line 6 def gradient @gradient end |
#ranges ⇒ Object (readonly)
Returns the value of attribute ranges.
6 7 8 |
# File 'lib/rainbow/opacity_ranges.rb', line 6 def ranges @ranges end |