Class: BrickFTP::API::Authentication::Session

Inherits:
Base
  • Object
show all
Defined in:
lib/brick_ftp/api/authentication/session.rb

Constant Summary

Constants inherited from Base

Base::QUERY_PARAMS

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

all, api_path_for, attributes, define_api, define_readonly_attributes, define_writable_attributes, find, inherited, #initialize, #update

Constructor Details

This class inherits a constructor from BrickFTP::API::Base

Class Method Details

.create(params = {}) ⇒ Object



10
11
12
# File 'lib/brick_ftp/api/authentication/session.rb', line 10

def self.create(params = {})
  super.tap { |x| BrickFTP.config.session = x }
end

Instance Method Details

#destroy ⇒ Object



14
15
16
17
18
19
# File 'lib/brick_ftp/api/authentication/session.rb', line 14

def destroy
  super.tap do
    @id = nil
    BrickFTP.config.session = nil
  end
end