lib/faye-rails/rack_adapter.rb in faye-rails-1.0.6 vs lib/faye-rails/rack_adapter.rb in faye-rails-1.0.7

- old
+ new

@@ -31,12 +31,12 @@ # # :default => :block # # :default can be set to :allow, :drop or :block. # if :drop is chosen then messages to unknown channels - # will be silently dropped, whereas if you choose - # :block then the message will be returned with the + # will be silently dropped, whereas if you choose + # :block then the message will be returned with the # error "Permission denied." def map(opts) if opts.is_a? Hash opts.each do |channel, controller| if channel.is_a? String @@ -62,24 +62,24 @@ # it to log all messages in and out to Rails.logger.debug. def debug_messages add_extension(DebugMessagesExtension.new) end - private + private def routing_extension if @routing_extension @routing_extension else @routing_extension = RoutingExtension.new add_extension(@routing_extension) @routing_extension end end - + class DebugMessagesExtension - + def debug(*args) if defined? ::Rails Rails.logger.debug *args else puts *args @@ -95,10 +95,10 @@ debug " ** OUT: #{m.inspect}" c.call(m) end end - class RoutingExtension + class RoutingExtension def initialize @default = :allow @mappings = {} end