class StartcoinClient::API
Attributes
options[R]
params[R]
Public Class Methods
new(options = {})
click to toggle source
# File lib/startcoin_client/api.rb, line 19 def initialize(options = {}) @options = { :host => 'localhost', :port => 8332, :ssl => false, :proxy => nil, :verify_ssl => true }.merge(options) end
Public Instance Methods
host()
click to toggle source
# File lib/startcoin_client/api.rb, line 7 def host; options[:host]; end
host=(a)
click to toggle source
# File lib/startcoin_client/api.rb, line 14 def host=(a); options[:host] = a; end
pass()
click to toggle source
# File lib/startcoin_client/api.rb, line 6 def pass; options[:pass]; end
pass=(a)
click to toggle source
# File lib/startcoin_client/api.rb, line 13 def pass=(a); options[:pass] = a; end
port()
click to toggle source
# File lib/startcoin_client/api.rb, line 8 def port; options[:port]; end
port=(a)
click to toggle source
# File lib/startcoin_client/api.rb, line 15 def port=(a); options[:port] = a; end
proxy()
click to toggle source
# File lib/startcoin_client/api.rb, line 11 def proxy; options[:proxy]; end
proxy=(a)
click to toggle source
# File lib/startcoin_client/api.rb, line 17 def proxy=(a); options[:proxy] = a; end
request(service_name, *params)
click to toggle source
# File lib/startcoin_client/api.rb, line 33 def request(service_name, *params) req = StartcoinClient::Request.new(service_name, params) StartcoinClient::RPC.new(to_hash).dispatch(req) end
ssl()
click to toggle source
# File lib/startcoin_client/api.rb, line 9 def ssl; options[:ssl]; end
ssl=(a)
click to toggle source
# File lib/startcoin_client/api.rb, line 16 def ssl=(a); options[:ssl] = a; end
ssl?()
click to toggle source
# File lib/startcoin_client/api.rb, line 10 def ssl?; options[:ssl]; end
to_hash()
click to toggle source
# File lib/startcoin_client/api.rb, line 29 def to_hash @options.dup end
user()
click to toggle source
# File lib/startcoin_client/api.rb, line 5 def user; options[:user]; end
user=(a)
click to toggle source
# File lib/startcoin_client/api.rb, line 12 def user=(a); options[:user] = a; end