Class: Line::Bot::Message::Base
- Inherits:
-
Object
- Object
- Line::Bot::Message::Base
show all
- Defined in:
- lib/line/bot/message/base.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(attrs = {}) ⇒ Base
Returns a new instance of Base.
9
10
11
|
# File 'lib/line/bot/message/base.rb', line 9
def initialize(attrs = {})
@attrs = attrs
end
|
Instance Attribute Details
#attrs ⇒ Object
Returns the value of attribute attrs.
7
8
9
|
# File 'lib/line/bot/message/base.rb', line 7
def attrs
@attrs
end
|
#recipient_type ⇒ Object
Returns the value of attribute recipient_type.
7
8
9
|
# File 'lib/line/bot/message/base.rb', line 7
def recipient_type
@recipient_type
end
|
Instance Method Details
#[](key) ⇒ Object
17
18
19
|
# File 'lib/line/bot/message/base.rb', line 17
def [](key)
@attrs[key]
end
|
#content ⇒ Object
25
26
27
|
# File 'lib/line/bot/message/base.rb', line 25
def content
raise NotImplementedError, "Implement this method in a child class"
end
|
#valid? ⇒ Boolean
29
30
31
|
# File 'lib/line/bot/message/base.rb', line 29
def valid?
raise NotImplementedError, "Implement this method in a child class"
end
|