Class: Line::Bot::Message::Base
- Inherits:
-
Hash
- Object
- Hash
- Line::Bot::Message::Base
- Defined in:
- lib/line/bot/message/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#recipient_type ⇒ Object
readonly
Returns the value of attribute recipient_type.
Instance Method Summary collapse
- #content ⇒ Object
- #event_type ⇒ Object
-
#initialize(attrs = {}) ⇒ Base
constructor
A new instance of Base.
- #valid? ⇒ Boolean
Constructor Details
#initialize(attrs = {}) ⇒ Base
Returns a new instance of Base.
7 8 9 |
# File 'lib/line/bot/message/base.rb', line 7 def initialize(attrs = {}) self.merge!(attrs) end |
Instance Attribute Details
#recipient_type ⇒ Object (readonly)
Returns the value of attribute recipient_type.
5 6 7 |
# File 'lib/line/bot/message/base.rb', line 5 def recipient_type @recipient_type end |
Instance Method Details
#content ⇒ Object
19 20 21 |
# File 'lib/line/bot/message/base.rb', line 19 def content raise NotImplementedError, "Should implement this method in child class" end |
#event_type ⇒ Object
15 16 17 |
# File 'lib/line/bot/message/base.rb', line 15 def event_type Line::Bot::EventType::MESSAGE end |
#valid? ⇒ Boolean
23 24 25 |
# File 'lib/line/bot/message/base.rb', line 23 def valid? raise NotImplementedError, "Should implement this method in child class" end |