Class: ODF::DataStyle
Instance Method Summary collapse
-
#initialize(name, type) ⇒ DataStyle
constructor
A new instance of DataStyle.
- #method_missing(name, *args) ⇒ Object
- #xml ⇒ Object
Methods inherited from Container
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
#xml ⇒ Object
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 |