Class: Hutzbot::Response
- Inherits:
-
Object
- Object
- Hutzbot::Response
- Defined in:
- lib/hutzbot/hutzbot.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#speaker ⇒ Object
Returns the value of attribute speaker.
-
#speaker_name ⇒ Object
Returns the value of attribute speaker_name.
-
#statement ⇒ Object
Returns the value of attribute statement.
Instance Method Summary collapse
-
#initialize(attrs) ⇒ Response
constructor
A new instance of Response.
- #system? ⇒ Boolean
Constructor Details
#initialize(attrs) ⇒ Response
Returns a new instance of Response.
14 15 16 |
# File 'lib/hutzbot/hutzbot.rb', line 14 def initialize attrs @id, @speaker, @speaker_name, @statement, @metadata = *attrs.values_at('id', 'speaker', 'speaker_name', 'statement', 'metadata') end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
8 9 10 |
# File 'lib/hutzbot/hutzbot.rb', line 8 def id @id end |
#metadata ⇒ Object
Returns the value of attribute metadata.
12 13 14 |
# File 'lib/hutzbot/hutzbot.rb', line 12 def @metadata end |
#speaker ⇒ Object
Returns the value of attribute speaker.
9 10 11 |
# File 'lib/hutzbot/hutzbot.rb', line 9 def speaker @speaker end |
#speaker_name ⇒ Object
Returns the value of attribute speaker_name.
10 11 12 |
# File 'lib/hutzbot/hutzbot.rb', line 10 def speaker_name @speaker_name end |
#statement ⇒ Object
Returns the value of attribute statement.
11 12 13 |
# File 'lib/hutzbot/hutzbot.rb', line 11 def statement @statement end |
Instance Method Details
#system? ⇒ Boolean
18 19 20 |
# File 'lib/hutzbot/hutzbot.rb', line 18 def system? speaker=='system' end |