TreeStructure
# File lib/hammer_cli/output/adapter/json.rb, line 9 def print_collection(fields, collection) result = prepare_collection(fields, collection) puts JSON.pretty_generate(result) end
# File lib/hammer_cli/output/adapter/json.rb, line 14 def print_message(msg, msg_params={}) id = msg_params["id"] || msg_params[:id] name = msg_params["name"] || msg_params[:name] data = { :message => msg.format(msg_params) } data[:id] = id unless id.nil? data[:name] = name unless name.nil? puts JSON.pretty_generate(data) end
Generated with the Darkfish Rdoc Generator 2.