Class: Legion::Gaia::ChannelAdapter
- Inherits:
-
Object
- Object
- Legion::Gaia::ChannelAdapter
show all
- Defined in:
- lib/legion/gaia/channel_adapter.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(channel_id:, capabilities: []) ⇒ ChannelAdapter
Returns a new instance of ChannelAdapter.
8
9
10
11
12
|
# File 'lib/legion/gaia/channel_adapter.rb', line 8
def initialize(channel_id:, capabilities: [])
@channel_id = channel_id
@capabilities = capabilities
@started = false
end
|
Instance Attribute Details
#capabilities ⇒ Object
Returns the value of attribute capabilities.
6
7
8
|
# File 'lib/legion/gaia/channel_adapter.rb', line 6
def capabilities
@capabilities
end
|
#channel_id ⇒ Object
Returns the value of attribute channel_id.
6
7
8
|
# File 'lib/legion/gaia/channel_adapter.rb', line 6
def channel_id
@channel_id
end
|
Instance Method Details
#deliver(output_frame) ⇒ Object
34
35
36
|
# File 'lib/legion/gaia/channel_adapter.rb', line 34
def deliver(output_frame)
raise NotImplementedError, "#{self.class}#deliver must be implemented"
end
|
#start ⇒ Object
14
15
16
|
# File 'lib/legion/gaia/channel_adapter.rb', line 14
def start
@started = true
end
|
#started? ⇒ Boolean
22
23
24
|
# File 'lib/legion/gaia/channel_adapter.rb', line 22
def started?
@started
end
|
#stop ⇒ Object
18
19
20
|
# File 'lib/legion/gaia/channel_adapter.rb', line 18
def stop
@started = false
end
|
#supports?(capability) ⇒ Boolean
38
39
40
|
# File 'lib/legion/gaia/channel_adapter.rb', line 38
def supports?(capability)
capabilities.include?(capability)
end
|
#translate_inbound(raw_input) ⇒ Object
26
27
28
|
# File 'lib/legion/gaia/channel_adapter.rb', line 26
def translate_inbound(raw_input)
raise NotImplementedError, "#{self.class}#translate_inbound must be implemented"
end
|
#translate_outbound(output_frame) ⇒ Object
30
31
32
|
# File 'lib/legion/gaia/channel_adapter.rb', line 30
def translate_outbound(output_frame)
raise NotImplementedError, "#{self.class}#translate_outbound must be implemented"
end
|