Class: BotPlatform::Activity
- Inherits:
-
Object
- Object
- BotPlatform::Activity
- Defined in:
- lib/bot_platform/activity.rb
Constant Summary collapse
- TYPES =
{ typing: 1, message: 2, image: 3, confirm: 4, options: 5, carousel: 6, command: 7, card: 9 }.freeze
Instance Attribute Summary collapse
-
#channel_id ⇒ Object
readonly
Returns the value of attribute channel_id.
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#from ⇒ Object
readonly
Returns the value of attribute from.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#prefix ⇒ Object
readonly
Returns the value of attribute prefix.
-
#preview_url ⇒ Object
readonly
Returns the value of attribute preview_url.
-
#resource_id ⇒ Object
readonly
Returns the value of attribute resource_id.
-
#resource_url ⇒ Object
readonly
Returns the value of attribute resource_url.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
-
#to ⇒ Object
Returns the value of attribute to.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, opts = {}) ⇒ Activity
constructor
A new instance of Activity.
Constructor Details
#initialize(type, opts = {}) ⇒ Activity
Returns a new instance of Activity.
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/bot_platform/activity.rb', line 18 def initialize(type, opts={}) @type = type @resource_id = opts[:resource_id] @content = opts[:content] @options = opts[:options] @prefix = opts[:prefix] @text = opts[:text] @preview_url = opts[:preview_url] @resource_url = opts[:resource_url] @from = opts[:from] @to = opts[:to] @channel_id = opts[:channel_id] end |
Instance Attribute Details
#channel_id ⇒ Object (readonly)
Returns the value of attribute channel_id.
5 6 7 |
# File 'lib/bot_platform/activity.rb', line 5 def channel_id @channel_id end |
#content ⇒ Object (readonly)
Returns the value of attribute content.
5 6 7 |
# File 'lib/bot_platform/activity.rb', line 5 def content @content end |
#from ⇒ Object (readonly)
Returns the value of attribute from.
5 6 7 |
# File 'lib/bot_platform/activity.rb', line 5 def from @from end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/bot_platform/activity.rb', line 5 def @options end |
#prefix ⇒ Object (readonly)
Returns the value of attribute prefix.
5 6 7 |
# File 'lib/bot_platform/activity.rb', line 5 def prefix @prefix end |
#preview_url ⇒ Object (readonly)
Returns the value of attribute preview_url.
5 6 7 |
# File 'lib/bot_platform/activity.rb', line 5 def preview_url @preview_url end |
#resource_id ⇒ Object (readonly)
Returns the value of attribute resource_id.
5 6 7 |
# File 'lib/bot_platform/activity.rb', line 5 def resource_id @resource_id end |
#resource_url ⇒ Object (readonly)
Returns the value of attribute resource_url.
5 6 7 |
# File 'lib/bot_platform/activity.rb', line 5 def resource_url @resource_url end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
5 6 7 |
# File 'lib/bot_platform/activity.rb', line 5 def text @text end |
#to ⇒ Object
Returns the value of attribute to.
6 7 8 |
# File 'lib/bot_platform/activity.rb', line 6 def to @to end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
5 6 7 |
# File 'lib/bot_platform/activity.rb', line 5 def type @type end |