Class: XRay::CSS::Declaration
Instance Attribute Summary collapse
-
#property ⇒ Object
readonly
Returns the value of attribute property.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(property, value) ⇒ Declaration
constructor
A new instance of Declaration.
- #position ⇒ Object
- #text ⇒ Object
Constructor Details
#initialize(property, value) ⇒ Declaration
Returns a new instance of Declaration.
97 98 99 |
# File 'lib/css/struct.rb', line 97 def initialize(property, value) @property, @value = property, value end |
Instance Attribute Details
#property ⇒ Object (readonly)
Returns the value of attribute property.
95 96 97 |
# File 'lib/css/struct.rb', line 95 def property @property end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
95 96 97 |
# File 'lib/css/struct.rb', line 95 def value @value end |
Instance Method Details
#position ⇒ Object
105 106 107 |
# File 'lib/css/struct.rb', line 105 def position property.position end |
#text ⇒ Object
101 102 103 |
# File 'lib/css/struct.rb', line 101 def text "#{property}: #{value}" end |