Class: RODF::DataStyle

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

Constant Summary

Constants inherited from Container

Container::INFLECTOR

Instance Method Summary collapse

Methods inherited from Container

contains, create, module_for_stuff

Constructor Details

#initialize(name, type) ⇒ DataStyle

Returns a new instance of DataStyle.



12
13
14
15
16
# File 'lib/rodf/data_style.rb', line 12

def initialize(name, type)
  super

  @type, @name = type, name
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



24
25
26
# File 'lib/rodf/data_style.rb', line 24

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

Instance Method Details

#xmlObject



18
19
20
21
22
# File 'lib/rodf/data_style.rb', line 18

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