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