Class: Cb::CbApplication::CbAnswer

Inherits:
Object
  • Object
show all
Defined in:
lib/cb/models/cb_application.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, text) ⇒ CbAnswer

Returns a new instance of CbAnswer.



82
83
84
85
# File 'lib/cb/models/cb_application.rb', line 82

def initialize(id, text)
  @id   = id
  @text = text
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



80
81
82
# File 'lib/cb/models/cb_application.rb', line 80

def id
  @id
end

#textObject

Returns the value of attribute text.



80
81
82
# File 'lib/cb/models/cb_application.rb', line 80

def text
  @text
end

Instance Method Details

#to_xmlObject



87
88
89
# File 'lib/cb/models/cb_application.rb', line 87

def to_xml
  "<Response><QuestionID>#{@id}</QuestionID><ResponseText>#{@text}</ResponseText></Response>"
end