Class: CSSPool::Terms::Rgb

Inherits:
Node
  • Object
show all
Defined in:
lib/csspool/terms/rgb.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#blueObject

Returns the value of attribute blue.



6
7
8
# File 'lib/csspool/terms/rgb.rb', line 6

def blue
  @blue
end

#greenObject

Returns the value of attribute green.



5
6
7
# File 'lib/csspool/terms/rgb.rb', line 5

def green
  @green
end

#operatorObject

Returns the value of attribute operator.



9
10
11
# File 'lib/csspool/terms/rgb.rb', line 9

def operator
  @operator
end

#parse_locationObject

Returns the value of attribute parse_location.



8
9
10
# File 'lib/csspool/terms/rgb.rb', line 8

def parse_location
  @parse_location
end

#percentageObject 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

#redObject

Returns the value of attribute red.



4
5
6
# File 'lib/csspool/terms/rgb.rb', line 4

def red
  @red
end