Class: Cb::Models::Application::Answer

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

Overview

CbApplication

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, text) ⇒ Answer

Returns a new instance of Answer.



82
83
84
85
# File 'lib/cb/models/implementations/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/implementations/application.rb', line 80

def id
  @id
end

#textObject

Returns the value of attribute text.



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

def text
  @text
end

Instance Method Details

#to_xmlObject



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

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