Class: Slack::RealTime::Stores::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/slack/real_time/stores/base.rb

Overview

Doesn’t store anything.

Direct Known Subclasses

Starter, Store

Constant Summary collapse

CACHES =
%i[
  teams
  users
  bots
  public_channels
  private_channels
  ims
  mpims
].freeze

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(_attrs, _options = {}) ⇒ Base

Returns a new instance of Base.



43
# File 'lib/slack/real_time/stores/base.rb', line 43

def initialize(_attrs, _options = {}); end

Class Attribute Details

.eventsObject (readonly)

Returns the value of attribute events.



21
22
23
# File 'lib/slack/real_time/stores/base.rb', line 21

def events
  @events
end

Class Method Details

.inherited(subclass) ⇒ Object



23
24
25
26
# File 'lib/slack/real_time/stores/base.rb', line 23

def inherited(subclass)
  super
  subclass.instance_variable_set :@events, events.dup
end

.on(event, &handler) ⇒ Object



28
29
30
# File 'lib/slack/real_time/stores/base.rb', line 28

def on(event, &handler)
  events[event.to_s] << handler
end

Instance Method Details

#selfObject



35
36
37
# File 'lib/slack/real_time/stores/base.rb', line 35

def self
  nil
end

#teamObject



39
40
41
# File 'lib/slack/real_time/stores/base.rb', line 39

def team
  nil
end