Class: EPlat::Session

Inherits:
Object
  • Object
show all
Defined in:
lib/e_plat/session.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(platform:, store_url:, api_token:, store_hash: nil, api_version: nil) ⇒ Session

the session is an instance of EPlat::Client made available via Rails EPlat::Current::Attributes



6
7
8
9
10
11
12
13
14
# File 'lib/e_plat/session.rb', line 6

def initialize(platform:, store_url:, api_token:, store_hash: nil, api_version: nil)
	EPlat::Current.e_plat_session = EPlat::Client.new(
		platform: platform,
		store_url: store_url,
		api_token: api_token,
		store_hash: store_hash,
		api_version: api_version
	).freeze
end

Class Method Details

.clear!Object



16
17
18
# File 'lib/e_plat/session.rb', line 16

def self.clear!
	EPlat::Current.e_plat_session = nil
end