Class: Redmine::Views::Builders::Xml
- Inherits:
-
Builder::XmlMarkup
- Object
- Builder::XmlMarkup
- Redmine::Views::Builders::Xml
- Defined in:
- lib/redmine/views/builders/xml.rb
Instance Method Summary collapse
- #array(name, options = {}) ⇒ Object
-
#initialize(request, response) ⇒ Xml
constructor
A new instance of Xml.
- #output ⇒ Object
-
#tag!(sym, *args) ⇒ Object
Overrides Builder::XmlBase#tag! to format timestamps in ISO 8601.
Constructor Details
#initialize(request, response) ⇒ Xml
Returns a new instance of Xml.
26 27 28 29 |
# File 'lib/redmine/views/builders/xml.rb', line 26 def initialize(request, response) super() instruct! end |
Instance Method Details
#array(name, options = {}) ⇒ Object
44 45 46 |
# File 'lib/redmine/views/builders/xml.rb', line 44 def array(name, ={}, &) __send__(name, ( || {}).merge(:type => 'array'), &) end |
#output ⇒ Object
31 32 33 |
# File 'lib/redmine/views/builders/xml.rb', line 31 def output target! end |
#tag!(sym, *args) ⇒ Object
Overrides Builder::XmlBase#tag! to format timestamps in ISO 8601
36 37 38 39 40 41 42 |
# File 'lib/redmine/views/builders/xml.rb', line 36 def tag!(sym, *args, &) if args.size == 1 && args.first.is_a?(::Time) tag!(sym, args.first.xmlschema, &) else super end end |