Class: Line::Bot::Event::Message

Inherits:
Base
  • Object
show all
Defined in:
lib/line/bot/event/message.rb

Instance Method Summary collapse

Methods inherited from Base

#[], #initialize

Constructor Details

This class inherits a constructor from Line::Bot::Event::Base

Instance Method Details

#messageObject



37
38
39
# File 'lib/line/bot/event/message.rb', line 37

def message
  @src['message']
end

#typeObject



29
30
31
32
33
34
35
# File 'lib/line/bot/event/message.rb', line 29

def type
  begin
    Line::Bot::Event::MessageType.const_get(@src['message']['type'].capitalize)
  rescue NameError => e
    Line::Bot::Event::MessageType::Unsupport
  end
end