Class: ODF::DataStyle

Inherits:
Container show all
Defined in:
lib/odf/data_style.rb

Instance Method Summary collapse

Methods inherited from Container

contains, create

Constructor Details

#initialize(name, type) ⇒ DataStyle

Returns a new instance of DataStyle.



31
32
33
# File 'lib/odf/data_style.rb', line 31

def initialize(name, type)
  @type, @name = type, name
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



41
42
43
# File 'lib/odf/data_style.rb', line 41

def method_missing(name, *args)
  section(name, *args)
end

Instance Method Details

#xmlObject



35
36
37
38
39
# File 'lib/odf/data_style.rb', line 35

def xml
  Builder::XmlMarkup.new.tag! "number:#{@type}-style", 'style:name' => @name do |xml|
    xml << style_sections_xml
  end
end