Class: Slack::Client
- Inherits:
-
Object
- Object
- Slack::Client
- Defined in:
- lib/slack/client.rb
Instance Attribute Summary collapse
-
#channels ⇒ Object
readonly
Returns the value of attribute channels.
-
#im ⇒ Object
readonly
Returns the value of attribute im.
-
#token ⇒ Object
Returns the value of attribute token.
-
#users ⇒ Object
readonly
Returns the value of attribute users.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(args = {}) ⇒ Client
Returns a new instance of Client.
8 9 10 11 12 13 14 |
# File 'lib/slack/client.rb', line 8 def initialize(args = {}) @token = args[:token] @channels = Slack::API::Channels.new(token: @token) @im = Slack::API::IM.new(token: @token) @users = Slack::API::Users.new(token: @token) end |
Instance Attribute Details
#channels ⇒ Object (readonly)
Returns the value of attribute channels.
6 7 8 |
# File 'lib/slack/client.rb', line 6 def channels @channels end |
#im ⇒ Object (readonly)
Returns the value of attribute im.
6 7 8 |
# File 'lib/slack/client.rb', line 6 def im @im end |
#token ⇒ Object
Returns the value of attribute token.
5 6 7 |
# File 'lib/slack/client.rb', line 5 def token @token end |
#users ⇒ Object (readonly)
Returns the value of attribute users.
6 7 8 |
# File 'lib/slack/client.rb', line 6 def users @users end |