Class: BrickFTP::Configuration
- Inherits:
-
Object
- Object
- BrickFTP::Configuration
- Defined in:
- lib/brick_ftp/configuration.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#session ⇒ Object
Returns the value of attribute session.
-
#subdomain ⇒ Object
Returns the value of attribute subdomain.
Instance Method Summary collapse
- #api_host ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
10 11 12 13 14 15 16 17 |
# File 'lib/brick_ftp/configuration.rb', line 10 def initialize self.subdomain = ENV['BRICK_FTP_SUBDOMAIN'] self.api_key = ENV['BRICK_FTP_API_KEY'] self.session = nil self.logger = Logger.new(STDOUT) logger.level = Logger::WARN end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
6 7 8 |
# File 'lib/brick_ftp/configuration.rb', line 6 def api_key @api_key end |
#logger ⇒ Object
Returns the value of attribute logger.
8 9 10 |
# File 'lib/brick_ftp/configuration.rb', line 8 def logger @logger end |
#session ⇒ Object
Returns the value of attribute session.
7 8 9 |
# File 'lib/brick_ftp/configuration.rb', line 7 def session @session end |
#subdomain ⇒ Object
Returns the value of attribute subdomain.
5 6 7 |
# File 'lib/brick_ftp/configuration.rb', line 5 def subdomain @subdomain end |
Instance Method Details
#api_host ⇒ Object
19 20 21 |
# File 'lib/brick_ftp/configuration.rb', line 19 def api_host "#{subdomain}.brickftp.com" end |