Class: RequestConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/calimero/types/rpc.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(timeout: nil, headers: nil) ⇒ RequestConfig

Returns a new instance of RequestConfig.



47
48
49
50
# File 'lib/calimero/types/rpc.rb', line 47

def initialize(timeout: nil, headers: nil)
  @timeout = timeout
  @headers = headers
end

Instance Attribute Details

#headersObject

Returns the value of attribute headers.



45
46
47
# File 'lib/calimero/types/rpc.rb', line 45

def headers
  @headers
end

#timeoutObject

Returns the value of attribute timeout.



45
46
47
# File 'lib/calimero/types/rpc.rb', line 45

def timeout
  @timeout
end

Instance Method Details

#to_hObject



52
53
54
55
56
57
# File 'lib/calimero/types/rpc.rb', line 52

def to_h
  {
    timeout: @timeout,
    headers: @headers
  }
end