Class: Lita::Adapters::Slack::SlackIM Private

Inherits:
Object
  • Object
show all
Defined in:
lib/lita/adapters/slack/slack_im.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, user_id) ⇒ SlackIM

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of SlackIM.


19
20
21
22
# File 'lib/lita/adapters/slack/slack_im.rb', line 19

def initialize(id, user_id)
  @id = id
  @user_id = user_id
end

Instance Attribute Details

#idObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


16
17
18
# File 'lib/lita/adapters/slack/slack_im.rb', line 16

def id
  @id
end

#user_idObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


17
18
19
# File 'lib/lita/adapters/slack/slack_im.rb', line 17

def user_id
  @user_id
end

Class Method Details

.from_data(im_data) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


11
12
13
# File 'lib/lita/adapters/slack/slack_im.rb', line 11

def from_data(im_data)
  new(im_data['id'], im_data['user'])
end

.from_data_array(ims_data) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


7
8
9
# File 'lib/lita/adapters/slack/slack_im.rb', line 7

def from_data_array(ims_data)
  ims_data.map { |im_data| from_data(im_data) }
end