Class: ODF::Property
- Inherits:
 - 
      Object
      
        
- Object
 - ODF::Property
 
 
- Defined in:
 - lib/odf/property.rb
 
Constant Summary collapse
- PROPERTY_NAMES =
 {:cell => 'style:table-cell-properties', :text => 'style:text-properties'}
Instance Method Summary collapse
- 
  
    
      #initialize(type, specs = {})  ⇒ Property 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Property.
 - #xml ⇒ Object
 
Constructor Details
#initialize(type, specs = {}) ⇒ Property
Returns a new instance of Property.
      26 27 28 29  | 
    
      # File 'lib/odf/property.rb', line 26 def initialize(type, specs={}) @name = PROPERTY_NAMES[type] @specs = specs.map { |k, v| [k.to_s, v] } end  | 
  
Instance Method Details
#xml ⇒ Object
      31 32 33 34 35 36 37  | 
    
      # File 'lib/odf/property.rb', line 31 def xml specs = {} @specs.each do |k, v| specs['fo:' + k] = v end Builder::XmlMarkup.new.tag! @name, specs end  |