Class: RODF::DataStyle

Inherits:
Container show all
Defined in:
lib/rodf/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.



29
30
31
# File 'lib/rodf/data_style.rb', line 29

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



39
40
41
# File 'lib/rodf/data_style.rb', line 39

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

Instance Method Details

#xmlObject



33
34
35
36
37
# File 'lib/rodf/data_style.rb', line 33

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