Skip to content
Browse files

style nitpick

  • Loading branch information...
1 parent 6799941 commit be1bf4ee4a4597f2ed4f8b8a22ce61eb4cd40c13 @vangberg committed Feb 9, 2010
Showing with 11 additions and 11 deletions.
  1. +8 −8 lib/librevox/listener/base.rb
  2. +3 −3 lib/librevox/listener/outbound.rb
View
16 lib/librevox/listener/base.rb
@@ -10,7 +10,7 @@ def hooks
@hooks ||= []
end
- def event(event, &block)
+ def event event, &block
hooks << [event, block]
end
end
@@ -23,20 +23,20 @@ def event(event, &block)
class CommandDelegate
include Librevox::Commands
- def initialize(listener)
+ def initialize listener
@listener = listener
end
- def run_cmd(*args, &block)
+ def run_cmd *args, &block
@listener.run_cmd *args, &block
end
end
- def api(cmd, *args, &block)
+ def api cmd, *args, &block
@command_delegate.send(cmd, *args, &block)
end
- def run_cmd(cmd, &block)
+ def run_cmd cmd, &block
send_data "#{cmd}\n\n"
@command_queue << (block || lambda {})
end
@@ -49,7 +49,7 @@ def post_init
@command_queue = []
end
- def receive_request(header, content)
+ def receive_request header, content
@response = Librevox::Response.new(header, content)
handle_response
end
@@ -64,7 +64,7 @@ def handle_response
end
# override
- def on_event(event)
+ def on_event event
end
alias :done :close_connection_after_writing
@@ -80,7 +80,7 @@ def invoke_event_hooks
def invoke_command_queue
block = @command_queue.shift
- block.call(response)
+ block.call response
end
end
end
View
6 lib/librevox/listener/outbound.rb
@@ -6,7 +6,7 @@ module Listener
class Outbound < Base
include Librevox::Applications
- def execute_app(app, args="", params={}, &block)
+ def execute_app app, args="", params={}, &block
msg = "sendmsg\n"
msg << "call-command: execute\n"
msg << "execute-app-name: #{app}\n"
@@ -24,7 +24,7 @@ def execute_app(app, args="", params={}, &block)
end
# This should probably be in Application#sendmsg instead.
- def sendmsg(msg)
+ def sendmsg msg
send_data "sendmsg\n%s" % msg
end
@@ -69,7 +69,7 @@ def resume_with_channel_var
end
def update_session &block
- send_data("api uuid_dump #{session[:unique_id]}\n\n")
+ send_data "api uuid_dump #{session[:unique_id]}\n\n"
@command_queue << (block || lambda {})
end
end

0 comments on commit be1bf4e

Please sign in to comment.
Something went wrong with that request. Please try again.