Class: Slack::Client

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

Constant Summary collapse

METHODS =
%w(users.info users.list channels.history channels.join
channels.mark channels.list files.upload files.list
im.history im.list groups.history groups.list
search.all search.files search.messages
chat.postMessage auth.test)

Instance Method Summary collapse

Methods inherited from API

#initialize

Methods included from Request

#delete, #get, #post, #put

Constructor Details

This class inherits a constructor from Slack::API

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(action, *args) ⇒ Object



13
14
15
# File 'lib/slack/client.rb', line 13

def method_missing(action, *args)
  post(action.id2name.gsub("_", "."), *args)
end

Instance Method Details

#respond_to?(method) ⇒ Boolean



9
10
11
# File 'lib/slack/client.rb', line 9

def respond_to?(method)
  return METHODS.include?(method.id2name.gsub("_", ".")) || super
end