Class: RuboCop::Formatter::HTMLFormatter::Color Private
- Inherits:
-
Struct
- Object
- Struct
- RuboCop::Formatter::HTMLFormatter::Color
- Defined in:
- lib/rubocop/formatter/html_formatter.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
-
#alpha ⇒ Object
Returns the value of attribute alpha.
-
#blue ⇒ Object
Returns the value of attribute blue.
-
#green ⇒ Object
Returns the value of attribute green.
-
#red ⇒ Object
Returns the value of attribute red.
Instance Method Summary collapse
- #fade_out(amount) ⇒ Object private
- #to_s ⇒ Object private
Instance Attribute Details
#alpha ⇒ Object
Returns the value of attribute alpha
15 16 17 |
# File 'lib/rubocop/formatter/html_formatter.rb', line 15 def alpha @alpha end |
#blue ⇒ Object
Returns the value of attribute blue
15 16 17 |
# File 'lib/rubocop/formatter/html_formatter.rb', line 15 def blue @blue end |
#green ⇒ Object
Returns the value of attribute green
15 16 17 |
# File 'lib/rubocop/formatter/html_formatter.rb', line 15 def green @green end |
#red ⇒ Object
Returns the value of attribute red
15 16 17 |
# File 'lib/rubocop/formatter/html_formatter.rb', line 15 def red @red end |
Instance Method Details
#fade_out(amount) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
20 21 22 |
# File 'lib/rubocop/formatter/html_formatter.rb', line 20 def fade_out(amount) dup.tap { |color| color.alpha -= amount } end |
#to_s ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 |
# File 'lib/rubocop/formatter/html_formatter.rb', line 16 def to_s "rgba(#{values.join(', ')})" end |