Class: JohnDoe::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/johndoe/responser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(t, e) ⇒ Response

Returns a new instance of Response.



4
5
6
7
# File 'lib/johndoe/responser.rb', line 4

def initialize(t,e)
  @text = t
  @emotion = e[rand(e.size)]
end

Instance Attribute Details

#emotionObject

Returns the value of attribute emotion.



3
4
5
# File 'lib/johndoe/responser.rb', line 3

def emotion
  @emotion
end

#textObject

Returns the value of attribute text.



3
4
5
# File 'lib/johndoe/responser.rb', line 3

def text
  @text
end