Class: Blockcypher::Client
- Inherits:
-
Object
- Object
- Blockcypher::Client
- Includes:
- Api
- Defined in:
- lib/blockcypher/client.rb,
lib/blockcypher/client/api.rb,
lib/blockcypher/client/version.rb
Defined Under Namespace
Modules: Api
Constant Summary collapse
- VERSION =
"0.0.2"
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
Methods included from Api
#address, #blocks, #chain, #create_address, #transactions
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
13 14 15 16 17 18 19 20 |
# File 'lib/blockcypher/client.rb', line 13 def initialize( = {}) chain = [:chain] || :main coin = [:coin] || :btc @config = Config.new( URI("https://api.blockcypher.com/v1/#{coin}/#{chain}"), [:token] ) end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
11 12 13 |
# File 'lib/blockcypher/client.rb', line 11 def config @config end |