Class: JohnDoe::Response
- Inherits:
-
Object
- Object
- JohnDoe::Response
- Defined in:
- lib/johndoe/responser.rb
Instance Attribute Summary collapse
-
#emotion ⇒ Object
Returns the value of attribute emotion.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(t, e) ⇒ Response
constructor
A new instance of Response.
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
#emotion ⇒ Object
Returns the value of attribute emotion.
3 4 5 |
# File 'lib/johndoe/responser.rb', line 3 def emotion @emotion end |
#text ⇒ Object
Returns the value of attribute text.
3 4 5 |
# File 'lib/johndoe/responser.rb', line 3 def text @text end |