Class: EOS::Client
- Inherits:
-
Object
- Object
- EOS::Client
- Defined in:
- lib/eosrb.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(server = 'http://localhost:8888', hc = false) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(server = 'http://localhost:8888', hc = false) ⇒ Client
Returns a new instance of Client.
7 8 9 10 11 |
# File 'lib/eosrb.rb', line 7 def initialize(server='http://localhost:8888', hc=false) @server = server @hc = hc load_specs end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object (private)
Add API methods to class for seamless usage
50 51 52 53 54 55 56 |
# File 'lib/eosrb.rb', line 50 def method_missing(method_name, *args, &block) if respond_to_missing?(method_name) api_call(method_name, args.first) else super end end |
Class Method Details
.ar ⇒ Object
13 14 15 |
# File 'lib/eosrb.rb', line 13 def self.ar new('https://api.eosargentina.io') end |