Class: Redmine::Views::Builders::Xml

Inherits:
Builder::XmlMarkup
  • Object
show all
Defined in:
lib/redmine/views/builders/xml.rb

Instance Method Summary collapse

Constructor Details

#initializeXml

Returns a new instance of Xml.



22
23
24
25
# File 'lib/redmine/views/builders/xml.rb', line 22

def initialize
  super
  instruct!
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(sym, *args, &block) ⇒ Object



31
32
33
34
35
36
37
# File 'lib/redmine/views/builders/xml.rb', line 31

def method_missing(sym, *args, &block)
  if args.size == 1 && args.first.is_a?(Time)
    __send__ sym, args.first.xmlschema, &block
  else
    super
  end
end

Instance Method Details

#array(name, options = {}, &block) ⇒ Object



39
40
41
# File 'lib/redmine/views/builders/xml.rb', line 39

def array(name, options={}, &block)
  __send__ name, (options || {}).merge(:type => 'array'), &block
end

#outputObject



27
28
29
# File 'lib/redmine/views/builders/xml.rb', line 27

def output
  target!
end