-
-
Save banister/fd345efdabcb63255014 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Pilot < Pry::Autopilot | |
on ->(frame) { frame.method_name == :bing } do | |
input << "show-source" | |
input << "ls" | |
input << "next" | |
input.interactive! | |
end | |
on ->(frame) { frame.var("x") > 10 } do | |
output.puts "located a frame with x > 10" | |
input << "whereami" | |
end | |
end | |
# => #<NameError: uninitialized constant Pry::Autopilot> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So, for one I'd expect the frame method name would be a common case.