Class: Slack::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/slack/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#channelsObject (readonly)

Returns the value of attribute channels.



6
7
8
# File 'lib/slack/client.rb', line 6

def channels
  @channels
end

#imObject (readonly)

Returns the value of attribute im.



6
7
8
# File 'lib/slack/client.rb', line 6

def im
  @im
end

#tokenObject

Returns the value of attribute token.



5
6
7
# File 'lib/slack/client.rb', line 5

def token
  @token
end

#usersObject (readonly)

Returns the value of attribute users.



6
7
8
# File 'lib/slack/client.rb', line 6

def users
  @users
end