Class: Cabin::Subscriber

Inherits:
Object
  • Object
show all
Defined in:
lib/cabin/subscriber.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(output, options = {}) ⇒ Subscriber

Returns a new instance of Subscriber.



4
5
6
7
# File 'lib/cabin/subscriber.rb', line 4

def initialize(output, options = {})
  @output = output
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



3
4
5
# File 'lib/cabin/subscriber.rb', line 3

def options
  @options
end

#outputObject (readonly)

Returns the value of attribute output.



2
3
4
# File 'lib/cabin/subscriber.rb', line 2

def output
  @output
end

Instance Method Details

#<<(data) ⇒ Object



9
10
11
# File 'lib/cabin/subscriber.rb', line 9

def <<(data)
  @output << data
end