Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Sort methods
  • Loading branch information
drbrain committed Oct 8, 2010
1 parent af56517 commit 303c54b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/print_json_response.rb
Expand Up @@ -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?

Expand All @@ -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
Expand Down

0 comments on commit 303c54b

Please sign in to comment.