Module: Hooksler::Channel

Defined in:
lib/hooksler/channel.rb

Defined Under Namespace

Modules: Input, InstanceMethods, Output

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(base) ⇒ Object



7
8
9
# File 'lib/hooksler/channel.rb', line 7

def self.extended(base)
  base.send :include, InstanceMethods
end

Instance Method Details

#build(params = {}) ⇒ Object



11
12
13
# File 'lib/hooksler/channel.rb', line 11

def build(params = {})
  self.new(params)
end

#channel_nameObject



21
22
23
# File 'lib/hooksler/channel.rb', line 21

def channel_name
  @inbound_channel_name
end

#register_channel(type, name) ⇒ Object



15
16
17
18
19
# File 'lib/hooksler/channel.rb', line 15

def register_channel(type, name)
  fail "name is #{name.class} but must be a Symbol" unless name.is_a?(Symbol)
  @inbound_channel_name = name
  Hooksler::Router.register type, name, self
end