Class: Fdlint::Parser::CSS::Declaration

Inherits:
Node
  • Object
show all
Defined in:
lib/fdlint/parser/css/struct.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(property, value) ⇒ Declaration

Returns a new instance of Declaration.



96
97
98
# File 'lib/fdlint/parser/css/struct.rb', line 96

def initialize(property, value)
  @property, @value = property, value
end

Instance Attribute Details

#propertyObject (readonly)

Returns the value of attribute property.



94
95
96
# File 'lib/fdlint/parser/css/struct.rb', line 94

def property
  @property
end

#valueObject (readonly)

Returns the value of attribute value.



94
95
96
# File 'lib/fdlint/parser/css/struct.rb', line 94

def value
  @value
end

Instance Method Details

#positionObject



104
105
106
# File 'lib/fdlint/parser/css/struct.rb', line 104

def position
  property.position
end

#textObject



100
101
102
# File 'lib/fdlint/parser/css/struct.rb', line 100

def text
  "#{property}: #{value}"
end