module Ipfs::Command
Public Class Methods
build_request(path, **arguments)
click to toggle source
# File lib/ruby-ipfs-http-client/api/command.rb, line 14 def self.build_request(path, **arguments) keys = arguments.keys if keys.include?(:multihash) BasicRequest.new(path, multihash: arguments[:multihash]) elsif keys.include?(:filepath) FileUploadRequest.new(path, arguments[:filepath]) else BasicRequest.new(path) end end