Class: ODT2HTML::Declaration

Inherits:
Object
  • Object
show all
Defined in:
lib/odt2html-nsi/declaration.rb

Overview

This class represents a CSS declaration; a property/value pair

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(property = nil, value = nil) ⇒ Declaration

Returns a new instance of Declaration.



6
7
8
9
# File 'lib/odt2html-nsi/declaration.rb', line 6

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

Instance Attribute Details

#propertyObject

Returns the value of attribute property.



5
6
7
# File 'lib/odt2html-nsi/declaration.rb', line 5

def property
  @property
end

#valueObject

Returns the value of attribute value.



5
6
7
# File 'lib/odt2html-nsi/declaration.rb', line 5

def value
  @value
end

Instance Method Details

#to_sObject



11
12
13
# File 'lib/odt2html-nsi/declaration.rb', line 11

def to_s
  return "#{property}: #{value}"
end