Class: RocketChat::ImSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/rocket_chat/im_summary.rb

Overview

Rocket.Chat IM Summary

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ ImSummary

Returns a new instance of ImSummary.

Parameters:

  • data (Hash)

    Raw info data



14
15
16
# File 'lib/rocket_chat/im_summary.rb', line 14

def initialize(data)
  @data = Util.stringify_hash_keys data
end

Instance Attribute Details

#dataObject (readonly)

Raw info data



9
10
11
# File 'lib/rocket_chat/im_summary.rb', line 9

def data
  @data
end

Instance Method Details

#joinedObject



18
19
20
# File 'lib/rocket_chat/im_summary.rb', line 18

def joined
  data['joined']
end

#latestObject

Last message sent



43
44
45
# File 'lib/rocket_chat/im_summary.rb', line 43

def latest
  data['latest']
end

#membersObject

Qty of members in the chat



23
24
25
# File 'lib/rocket_chat/im_summary.rb', line 23

def members
  data['members']
end

#msgsObject

Qty of messages in the chat



38
39
40
# File 'lib/rocket_chat/im_summary.rb', line 38

def msgs
  data['msgs']
end

#successObject



52
53
54
# File 'lib/rocket_chat/im_summary.rb', line 52

def success
  data['success']
end

#unreadsObject

Qty of unread messages



28
29
30
# File 'lib/rocket_chat/im_summary.rb', line 28

def unreads
  data['unreads']
end

#unreads_fromObject

Timestamp



33
34
35
# File 'lib/rocket_chat/im_summary.rb', line 33

def unreads_from
  data['unreadsFrom']
end

#user_mentionsObject

Qty of mentions



48
49
50
# File 'lib/rocket_chat/im_summary.rb', line 48

def user_mentions
  data['userMentions']
end