Class: Laksa::Jsonrpc::Provider

Inherits:
Object
  • Object
show all
Defined in:
lib/laksa/jsonrpc/provider.rb

Instance Method Summary collapse

Constructor Details

#initialize(endpoint) ⇒ Provider

Returns a new instance of Provider.



14
15
16
# File 'lib/laksa/jsonrpc/provider.rb', line 14

def initialize(endpoint)
  @client = JSONRPC::Client.new(endpoint)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(sym, *args) ⇒ Object



18
19
20
# File 'lib/laksa/jsonrpc/provider.rb', line 18

def method_missing(sym, *args)
  @client.invoke(sym.to_s, args)
end