Class: Ipfs::BasicRequest

Inherits:
Request
  • Object
show all
Defined in:
lib/ruby-ipfs-http-client/request/basic_request.rb

Instance Attribute Summary

Attributes inherited from Request

#path, #verb

Instance Method Summary collapse

Constructor Details

#initialize(path, **arguments) ⇒ BasicRequest

Returns a new instance of BasicRequest.



5
6
7
8
9
# File 'lib/ruby-ipfs-http-client/request/basic_request.rb', line 5

def initialize(path, **arguments)
  super(path, :get)

  @multihash = arguments[:multihash]
end

Instance Method Details

#optionsObject



11
12
13
14
15
# File 'lib/ruby-ipfs-http-client/request/basic_request.rb', line 11

def options
  @multihash \
    ? { params: { arg: @multihash.raw } } \
    : {}
end