class PryToggle::Exec
Public Class Methods
new(args, hash)
click to toggle source
# File lib/pry_toggle/exec.rb, line 5 def initialize(args, hash) if args.first =~ /\A(.+):(\d+?)\z/ @service = PryToggle::Service.new($1, $2.to_i, '', "binding.pry\n", hash[:on]) else if hash[:on] puts <<-DOC === Invalid command format. should be like that. === $ pry-on example.rb:10 DOC else puts <<-DOC === Invalid command format. should be like that. === $ pry-off example.rb:10 DOC end end end
Public Instance Methods
executable?()
click to toggle source
# File lib/pry_toggle/exec.rb, line 29 def executable? !!@service end
execute!()
click to toggle source
# File lib/pry_toggle/exec.rb, line 25 def execute! @service.execute end