class Fabric::Gateway
Gateway
represents the connection of a specific client identity to a Fabric
Gateway
.
Attributes
client[R]
signer[R]
Public Class Methods
new(signer, client)
click to toggle source
Initialize a new Gateway
@param [Fabric::Identity] signer identity utilized to sign transactions @param [Fabric::Client] client Gateway
Client
# File lib/fabric/gateway.rb, line 16 def initialize(signer, client) raise InvalidArgument, 'signer must be Fabric::Identity' unless signer.is_a? Fabric::Identity raise InvalidArgument, 'client must be Fabric::Client' unless client.is_a? Fabric::Client @signer = signer @client = client end
Public Instance Methods
new_network(name)
click to toggle source
Initialize new network from the Gateway
@param [string] name channel name
@return [Fabric::Network] returns a new network
# File lib/fabric/gateway.rb, line 31 def new_network(name) Network.new(self, name) end