Class: RocketChat::ImSummary
- Inherits:
 - 
      Object
      
        
- Object
 - RocketChat::ImSummary
 
 
- Defined in:
 - lib/rocket_chat/im_summary.rb
 
Overview
Rocket.Chat IM Summary
Instance Attribute Summary collapse
- 
  
    
      #data  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Raw info data.
 
Instance Method Summary collapse
- 
  
    
      #initialize(data)  ⇒ ImSummary 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of ImSummary.
 - #joined ⇒ Object
 - 
  
    
      #latest  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Last message sent.
 - 
  
    
      #members  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Qty of members in the chat.
 - 
  
    
      #msgs  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Qty of messages in the chat.
 - #success ⇒ Object
 - 
  
    
      #unreads  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Qty of unread messages.
 - 
  
    
      #unreads_from  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Timestamp.
 - 
  
    
      #user_mentions  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Qty of mentions.
 
Constructor Details
#initialize(data) ⇒ ImSummary
Returns a new instance of ImSummary.
      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
#data ⇒ Object (readonly)
Raw info data
      9 10 11  | 
    
      # File 'lib/rocket_chat/im_summary.rb', line 9 def data @data end  | 
  
Instance Method Details
#joined ⇒ Object
      18 19 20  | 
    
      # File 'lib/rocket_chat/im_summary.rb', line 18 def joined data['joined'] end  | 
  
#latest ⇒ Object
Last message sent
      43 44 45  | 
    
      # File 'lib/rocket_chat/im_summary.rb', line 43 def latest data['latest'] end  | 
  
#members ⇒ Object
Qty of members in the chat
      23 24 25  | 
    
      # File 'lib/rocket_chat/im_summary.rb', line 23 def members data['members'] end  | 
  
#msgs ⇒ Object
Qty of messages in the chat
      38 39 40  | 
    
      # File 'lib/rocket_chat/im_summary.rb', line 38 def msgs data['msgs'] end  | 
  
#success ⇒ Object
      52 53 54  | 
    
      # File 'lib/rocket_chat/im_summary.rb', line 52 def success data['success'] end  | 
  
#unreads ⇒ Object
Qty of unread messages
      28 29 30  | 
    
      # File 'lib/rocket_chat/im_summary.rb', line 28 def unreads data['unreads'] end  | 
  
#unreads_from ⇒ Object
Timestamp
      33 34 35  | 
    
      # File 'lib/rocket_chat/im_summary.rb', line 33 def unreads_from data['unreadsFrom'] end  | 
  
#user_mentions ⇒ Object
Qty of mentions
      48 49 50  | 
    
      # File 'lib/rocket_chat/im_summary.rb', line 48 def user_mentions data['userMentions'] end  |