Class: Chatbox::Inbox

Inherits:
Object
  • Object
show all
Includes:
FakeMissingKeywords
Defined in:
lib/chatbox/inbox.rb

Instance Method Summary collapse

Methods included from FakeMissingKeywords

#req

Constructor Details

#initialize(entity: req(:entity), store: req(:store)) ⇒ Inbox

Returns a new instance of Inbox.



8
9
10
11
# File 'lib/chatbox/inbox.rb', line 8

def initialize(entity: req(:entity), store: req(:store))
  @id = entity.chatbox_id
  @store = store
end

Instance Method Details

#==(other) ⇒ Object Also known as: eql?



15
16
17
# File 'lib/chatbox/inbox.rb', line 15

def ==(other)
  other.is_a?(self.class) && id == other.id && store == other.store
end

#hashObject



21
22
23
# File 'lib/chatbox/inbox.rb', line 21

def hash
  id.hash ^ store.hash
end