I hereby claim:
- I am cshirley on github.
- I am cshirley (https://keybase.io/cshirley) on keybase.
- I have a public key ASBqu7KPXWOjRV6TRDnxrT6xXc-zW1iBj2aoZD3LQsVO-Qo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| require 'nokogiri' | |
| require 'json' | |
| require 'byebug' | |
| require 'fileutils' | |
| def export_html(filename) | |
| doc = Nokogiri::HTML(File.read(filename)) | |
| @body = doc.css('div.light') |
| task :add_args do | |
| args = ARGV[2..-1] | |
| options = {} | |
| OptionParser.new do |opts| | |
| opts.banner = "Usage: rake test:check_args [options]" | |
| opts.on("-o", "--one ARG", Integer) { |num1| options[:num1] = num1 } | |
| opts.on("-t", "--two ARG", Integer) { |num2| options[:num2] = num2 } | |
| end.parse!(args) | |
| puts options[:num1].to_i + options[:num2].to_i | |
| exit |
| def trace_method(filter) | |
| trace = TracePoint.trace(:call) do |tp| | |
| p [tp.event, Time.now.to_f, "#{tp.path}:#{tp.lineno}", tp.defined_class.name, tp.method_id] if tp.path =~ /#{filter}/i | |
| end | |
| trace.enable | |
| yield | |
| trace.disable | |
| end |