Class: Slk::Support::SlackUrlParser::Result
- Inherits:
-
Data
- Object
- Data
- Slk::Support::SlackUrlParser::Result
- Defined in:
- lib/slk/support/slack_url_parser.rb
Instance Attribute Summary collapse
-
#channel_id ⇒ Object
readonly
Returns the value of attribute channel_id.
-
#msg_ts ⇒ Object
readonly
Returns the value of attribute msg_ts.
-
#thread_ts ⇒ Object
readonly
Returns the value of attribute thread_ts.
-
#workspace ⇒ Object
readonly
Returns the value of attribute workspace.
Instance Method Summary collapse
- #message? ⇒ Boolean
- #thread? ⇒ Boolean
-
#ts ⇒ Object
Returns the thread parent timestamp if this URL points to a threaded message.
Instance Attribute Details
#channel_id ⇒ Object (readonly)
Returns the value of attribute channel_id
16 17 18 |
# File 'lib/slk/support/slack_url_parser.rb', line 16 def channel_id @channel_id end |
#msg_ts ⇒ Object (readonly)
Returns the value of attribute msg_ts
16 17 18 |
# File 'lib/slk/support/slack_url_parser.rb', line 16 def msg_ts @msg_ts end |
#thread_ts ⇒ Object (readonly)
Returns the value of attribute thread_ts
16 17 18 |
# File 'lib/slk/support/slack_url_parser.rb', line 16 def thread_ts @thread_ts end |
#workspace ⇒ Object (readonly)
Returns the value of attribute workspace
16 17 18 |
# File 'lib/slk/support/slack_url_parser.rb', line 16 def workspace @workspace end |
Instance Method Details
#message? ⇒ Boolean
17 18 19 |
# File 'lib/slk/support/slack_url_parser.rb', line 17 def !msg_ts.nil? end |
#thread? ⇒ Boolean
21 22 23 |
# File 'lib/slk/support/slack_url_parser.rb', line 21 def thread? !thread_ts.nil? end |
#ts ⇒ Object
Returns the thread parent timestamp if this URL points to a threaded message. Use this when fetching thread replies - pass this as the thread_ts parameter. Returns nil if the URL does not contain a thread_ts query parameter.
28 29 30 |
# File 'lib/slk/support/slack_url_parser.rb', line 28 def ts thread_ts end |