Class: Line::Bot::Message::Text

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

Instance Attribute Summary

Attributes inherited from Base

#recipient_type

Instance Method Summary collapse

Methods inherited from Base

#event_type, #initialize

Constructor Details

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

Instance Method Details

#contentObject



5
6
7
8
9
10
11
# File 'lib/line/bot/message/text.rb', line 5

def content
  {
    contentType: ContentType::TEXT,
    toType: recipient_type,
    text: self[:text]
  }
end

#valid?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/line/bot/message/text.rb', line 13

def valid?
  !self[:text].nil?
end