Class: CSSPool::Terms::Rgb
Instance Attribute Summary collapse
-
#blue ⇒ Object
Returns the value of attribute blue.
-
#green ⇒ Object
Returns the value of attribute green.
-
#operator ⇒ Object
Returns the value of attribute operator.
-
#parse_location ⇒ Object
Returns the value of attribute parse_location.
-
#percentage ⇒ Object
(also: #percentage?)
Returns the value of attribute percentage.
-
#red ⇒ Object
Returns the value of attribute red.
Instance Method Summary collapse
-
#initialize(red, green, blue, percentage, operator, parse_location) ⇒ Rgb
constructor
A new instance of Rgb.
Methods included from Visitable
#==, #accept, #children, #each, #hash, #to_css
Constructor Details
#initialize(red, green, blue, percentage, operator, parse_location) ⇒ Rgb
Returns a new instance of Rgb.
12 13 14 15 16 17 18 19 20 |
# File 'lib/csspool/terms/rgb.rb', line 12 def initialize red, green, blue, percentage, operator, parse_location super() @red = red @green = green @blue = blue @percentage = percentage @operator = operator @parse_location = parse_location end |
Instance Attribute Details
#blue ⇒ Object
Returns the value of attribute blue.
6 7 8 |
# File 'lib/csspool/terms/rgb.rb', line 6 def blue @blue end |
#green ⇒ Object
Returns the value of attribute green.
5 6 7 |
# File 'lib/csspool/terms/rgb.rb', line 5 def green @green end |
#operator ⇒ Object
Returns the value of attribute operator.
9 10 11 |
# File 'lib/csspool/terms/rgb.rb', line 9 def operator @operator end |
#parse_location ⇒ Object
Returns the value of attribute parse_location.
8 9 10 |
# File 'lib/csspool/terms/rgb.rb', line 8 def parse_location @parse_location end |
#percentage ⇒ Object Also known as: percentage?
Returns the value of attribute percentage.
7 8 9 |
# File 'lib/csspool/terms/rgb.rb', line 7 def percentage @percentage end |
#red ⇒ Object
Returns the value of attribute red.
4 5 6 |
# File 'lib/csspool/terms/rgb.rb', line 4 def red @red end |