Class: Veye::API::Resource
- Inherits:
-
BaseResource
- Object
- BaseResource
- Veye::API::Resource
- Defined in:
- lib/veye/api/resource.rb
Instance Attribute Summary
Attributes inherited from BaseResource
Instance Method Summary collapse
-
#initialize(path = nil) ⇒ Resource
constructor
A new instance of Resource.
Methods inherited from BaseResource
Constructor Details
#initialize(path = nil) ⇒ Resource
Returns a new instance of Resource.
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/veye/api/resource.rb', line 7 def initialize(path = nil) super(path) timeout_val = $global_options[:timeout].to_i timeout = timeout_val if timeout_val > 0 timeout ||= 90 open_timeout = $global_options[:open_timeout].to_i || 10 @resource = RestClient::Resource.new( @full_path, timeout: timeout, open_timeout: open_timeout, ) end |