module RemoteTable::Json
Public Instance Methods
_each() { |row| ... }
click to toggle source
# File lib/remote_table/json.rb, line 3 def _each require 'json' data.each do |row| yield row end ensure local_copy.cleanup end
Private Instance Methods
data()
click to toggle source
# File lib/remote_table/json.rb, line 23 def data root_node.nil? ? parsed_json : parsed_json[root_node] end
json_string()
click to toggle source
# File lib/remote_table/json.rb, line 15 def json_string local_copy.encoded_io.read end
parsed_json()
click to toggle source
# File lib/remote_table/json.rb, line 19 def parsed_json ::JSON.parse(json_string) end