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 inherited from Node

#==, #accept, #children, #each, #hash, #to_css, #to_minified_css

Constructor Details

#initialize(red, green, blue, operator = nil, parse_location = {}) ⇒ Rgb

Returns a new instance of Rgb.



10
11
12
13
14
15
16
17
# File 'lib/csspool/terms/rgb.rb', line 10

def initialize red, green, blue, operator = nil, parse_location = {}
  super()
  @red    = red
  @green  = green
  @blue   = blue
  @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.



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

def operator
  @operator
end

#parse_locationObject

Returns the value of attribute parse_location.



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

def parse_location
  @parse_location
end

#redObject

Returns the value of attribute red.



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

def red
  @red
end