Class: Boty::Slack::IM
Instance Method Summary collapse
Methods included from URL
Instance Method Details
#open(user, parameters = {}) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/boty/slack/im.rb', line 7 def open(user, parameters = {}) defaults = { user: user } url = parameterize defaults.merge(parameters), path: ".open" info = URL.get(url) || {} Slack::Channel.new id: Hash(info["channel"])["id"], info: info end |