Class: CleverBotResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/cleverbot-api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response_data) ⇒ CleverBotResponse

Returns a new instance of CleverBotResponse.


80
81
82
83
# File 'lib/cleverbot-api.rb', line 80

def initialize response_data
  @question = response_data[8]
  @answer   = response_data[16]
end

Instance Attribute Details

#answerObject (readonly)

Returns the value of attribute answer


78
79
80
# File 'lib/cleverbot-api.rb', line 78

def answer
  @answer
end

#questionObject (readonly)

Returns the value of attribute question


78
79
80
# File 'lib/cleverbot-api.rb', line 78

def question
  @question
end