Module: Mooncell::Respond::InstanceMethods Private

Defined in:
lib/mooncell/respond.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0

Instance Method Summary collapse

Instance Method Details

#initialize(command) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0



63
64
65
# File 'lib/mooncell/respond.rb', line 63

def initialize(command)
  @command = command
end

#sendObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0



69
70
71
72
73
74
75
76
77
78
# File 'lib/mooncell/respond.rb', line 69

def send
  response = call
  if self.class.broadcast?
    command.conn.app.pool.each do |conn|
      conn.write(response)
    end
  else
    command.conn.write(response)
  end
end