From 303c54b0625d278b20e4af1157830f82ad0ac3d0 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Fri, 8 Oct 2010 12:30:06 -0700 Subject: [PATCH] Sort methods --- lib/print_json_response.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/print_json_response.rb b/lib/print_json_response.rb index 2467ff2..81d45c5 100644 --- a/lib/print_json_response.rb +++ b/lib/print_json_response.rb @@ -108,13 +108,6 @@ def diff results system "diff #{@diff_opts} #{tempfiles.map { |io| io.path}.join ' '}" end - def irb json - require 'irb' - @response = json - puts "JSON response is in @response" - IRB.start - end - def fetch url $stderr.puts "Retrieving #{url}:" if $stdout.tty? @@ -124,6 +117,13 @@ def fetch url json = @path.inject json do |data, item| data[item] end end + def irb json + require 'irb' + @response = json + puts "JSON response is in @response" + IRB.start + end + def run results = @urls.map do |url| fetch url