Class: Taskr::Models::TaskActionParameter

Inherits:
Base
  • Object
show all
Defined in:
lib/taskr/models.rb

Instance Method Summary collapse

Instance Method Details

#to_sObject



190
191
192
# File 'lib/taskr/models.rb', line 190

def to_s
  "#<#{self.class}:#{self.id}>"
end

#to_xml(options = {}) ⇒ Object



177
178
179
180
181
182
183
184
185
186
187
188
# File 'lib/taskr/models.rb', line 177

def to_xml(options = {})
  options[:indent] ||= 2
  xml = options[:builder] ||= Builder::XmlMarkup.new(:indent => options[:indent])
  xml.instruct! unless options[: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)
    end
  end
end