Class: PublicStorage::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/publicstorage/config.rb

Overview

The core configuration.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



14
15
16
17
# File 'lib/publicstorage/config.rb', line 14

def initialize
  @user_agent = ENV.fetch('PUBLICSTORAGE_USER_AGENT', "publicstorage.rb/#{VERSION}")
  @timeout = Integer(ENV.fetch('PUBLICSTORAGE_TIMEOUT', 60))
end

Instance Attribute Details

#timeoutInteger

Returns:

  • (Integer)


12
13
14
# File 'lib/publicstorage/config.rb', line 12

def timeout
  @timeout
end

#user_agentString

Returns:

  • (String)


8
9
10
# File 'lib/publicstorage/config.rb', line 8

def user_agent
  @user_agent
end