Skip to content

Commit

Permalink
allows debugging of proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
bleonard committed Jan 7, 2016
1 parent 333ade8 commit 1b2fe16
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -4,6 +4,7 @@
.config
.yardoc
.DS_Store
.byebug_history
Gemfile.lock
InstalledFiles
_yardoc
Expand Down
6 changes: 6 additions & 0 deletions lib/makara/proxy.rb
Expand Up @@ -11,6 +11,8 @@
module Makara
class Proxy < ::SimpleDelegator

METHOD_MISSING_SKIP = [ :byebug ]

class_attribute :hijack_methods
self.hijack_methods = []

Expand Down Expand Up @@ -71,6 +73,10 @@ def stick_to_master!(write_to_cache = true)
end

def method_missing(m, *args, &block)
if METHOD_MISSING_SKIP.include?(m)
return super(m, *args, &block)
end

any_connection do |con|
if con.respond_to?(m)
con.public_send(m, *args, &block)
Expand Down

0 comments on commit 1b2fe16

Please sign in to comment.