Class: Siwe::Config::Builder
- Inherits:
-
Object
- Object
- Siwe::Config::Builder
- Defined in:
- lib/siwe/config.rb
Overview
Mutable struct used inside Siwe.configure { |c| c.rpc_url = … }. Caller mutates fields, then build returns a frozen Config.
Instance Attribute Summary collapse
-
#adapter ⇒ Object
Returns the value of attribute adapter.
-
#rpc ⇒ Object
Returns the value of attribute rpc.
-
#rpc_url ⇒ Object
Returns the value of attribute rpc_url.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(rpc_url: nil, rpc: nil, adapter: nil) ⇒ Builder
constructor
A new instance of Builder.
Constructor Details
#initialize(rpc_url: nil, rpc: nil, adapter: nil) ⇒ Builder
Returns a new instance of Builder.
28 29 30 31 32 |
# File 'lib/siwe/config.rb', line 28 def initialize(rpc_url: nil, rpc: nil, adapter: nil) @rpc_url = rpc_url @rpc = rpc @adapter = adapter end |
Instance Attribute Details
#adapter ⇒ Object
Returns the value of attribute adapter.
26 27 28 |
# File 'lib/siwe/config.rb', line 26 def adapter @adapter end |
#rpc ⇒ Object
Returns the value of attribute rpc.
26 27 28 |
# File 'lib/siwe/config.rb', line 26 def rpc @rpc end |
#rpc_url ⇒ Object
Returns the value of attribute rpc_url.
26 27 28 |
# File 'lib/siwe/config.rb', line 26 def rpc_url @rpc_url end |