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.



47
48
49
50
# File 'lib/cb/models/cb_application.rb', line 47

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

Instance Attribute Details

#id ⇒ Object

Returns the value of attribute id.



45
46
47
# File 'lib/cb/models/cb_application.rb', line 45

def id
  @id
end

#text ⇒ Object

Returns the value of attribute text.



45
46
47
# File 'lib/cb/models/cb_application.rb', line 45

def text
  @text
end

Instance Method Details

#to_xml ⇒ Object



52
53
54
# File 'lib/cb/models/cb_application.rb', line 52

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