123456789_123456789_123456789_123456789_123456789_

Class: RuboCop::Formatter::HTMLFormatter::Color

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Struct
Instance Chain:
self, Struct
Inherits: Struct
  • Object
Defined in: lib/rubocop/formatter/html_formatter.rb

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#alpha (rw)

[ GitHub ]

  
# File 'lib/rubocop/formatter/html_formatter.rb', line 14

Color = Struct.new(:red, :green, :blue, :alpha)

#blue (rw)

[ GitHub ]

  
# File 'lib/rubocop/formatter/html_formatter.rb', line 14

Color = Struct.new(:red, :green, :blue, :alpha)

#green (rw)

[ GitHub ]

  
# File 'lib/rubocop/formatter/html_formatter.rb', line 14

Color = Struct.new(:red, :green, :blue, :alpha)

#red (rw)

[ GitHub ]

  
# File 'lib/rubocop/formatter/html_formatter.rb', line 14

Color = Struct.new(:red, :green, :blue, :alpha)

Instance Method Details

#fade_out(amount)

[ GitHub ]

  
# File 'lib/rubocop/formatter/html_formatter.rb', line 19

def fade_out(amount)
  dup.tap { |color| color.alpha -= amount }
end

#to_s

[ GitHub ]

  
# File 'lib/rubocop/formatter/html_formatter.rb', line 15

def to_s
  "rgba(#{values.join(', ')})"
end