Module: Cabin::Mixins::Terminal

Included in:
Channel
Defined in:
lib/cabin/mixins/terminal.rb

Instance Method Summary collapse

Instance Method Details

#terminal(message) ⇒ Object



5
6
7
8
9
10
# File 'lib/cabin/mixins/terminal.rb', line 5

def terminal(message)
  publish(message) do |subscriber, event|
    output = subscriber.output
    output.respond_to?(:tty?) && output.tty?
  end
end