Class: Duraflame::Transcript
- Inherits:
-
Object
- Object
- Duraflame::Transcript
- Defined in:
- lib/duraflame/transcript.rb
Instance Method Summary collapse
- #each_message ⇒ Object
-
#initialize(room, date, http_client) ⇒ Transcript
constructor
A new instance of Transcript.
Constructor Details
#initialize(room, date, http_client) ⇒ Transcript
Returns a new instance of Transcript.
3 4 5 6 7 |
# File 'lib/duraflame/transcript.rb', line 3 def initialize(room, date, http_client) @room = room @date = date @http_client = http_client end |
Instance Method Details
#each_message ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/duraflame/transcript.rb', line 9 def @http_client.get(url)['messages'].each do || if Duraflame.const_defined?(['type']) # e.g. TextMessage = Duraflame.const_get(['type']) args = .values_at('created_at', 'user_id', 'body') yield .new(*args) end end end |