Class: Taskr::Models::TaskActionParameter
- Inherits:
-
Base
- Object
- Base
- Taskr::Models::TaskActionParameter
- Defined in:
- lib/taskr/models.rb
Instance Method Summary collapse
Instance Method Details
#to_s ⇒ Object
224 225 226 |
# File 'lib/taskr/models.rb', line 224 def to_s "#{self.class.name.demodulize}(#{name}:#{value})" end |
#to_xml(options = {}) ⇒ Object
211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/taskr/models.rb', line 211 def to_xml( = {}) [:indent] ||= 2 xml = [:builder] ||= Builder::XmlMarkup.new(:indent => [:indent]) xml.instruct! unless [:skip_instruct] xml.tag!('action-parameter', :type => self.class) do xml.tag!('id', {:type => 'integer'}, id) xml.tag!('name', name) xml.tag!('value') do xml.cdata!(value.to_s) end end end |