lib/nanook.rb in nanook-2.1.0 vs lib/nanook.rb in nanook-2.2.0
- old
+ new
@@ -1,10 +1,10 @@
require 'net/http'
require 'uri'
require 'forwardable'
-Dir[File.dirname(__FILE__) + '/nanook/*.rb'].each {|file| require file }
+Dir[File.dirname(__FILE__) + '/nanook/*.rb'].each { |file| require file }
# ==== Initializing
#
# Connect to the default RPC host at http://localhost:7076 and with a timeout of 500 seconds:
#
@@ -40,15 +40,15 @@
end
# Returns a new instance of {Nanook}.
#
# ==== Examples:
- # Connecting to http://localhost:7076 with the default timeout of 600s:
+ # Connecting to http://localhost:7076 with the default timeout of 10s:
# Nanook.new
# Setting a custom timeout:
- # Nanook.new(timeout: 600)
+ # Nanook.new(timeout: 10)
# Connecting to a custom RPC host and setting a timeout:
- # Nanook.new("http://ip6-localhost.com:7076", timeout: 600)
+ # Nanook.new("http://ip6-localhost.com:7076", timeout: 10)
#
# @param uri [String] default is {Nanook::Rpc::DEFAULT_URI}. The RPC host to connect to
# @param timeout [Integer] default is {Nanook::Rpc::DEFAULT_TIMEOUT}. Connection timeout in number of seconds
def initialize(uri=Nanook::Rpc::DEFAULT_URI, timeout:Nanook::Rpc::DEFAULT_TIMEOUT)
@rpc = Nanook::Rpc.new(uri, timeout: timeout)