Class: Thron::Gateway::Base
- Inherits:
-
Object
- Object
- Thron::Gateway::Base
- Includes:
- Routable
- Defined in:
- lib/thron/gateway/base.rb
Direct Known Subclasses
Constant Summary collapse
- NO_ACTIVE_SESSION =
"Please provide a valid token ID"
Instance Attribute Summary collapse
-
#token_id ⇒ Object
Returns the value of attribute token_id.
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Routable
Instance Attribute Details
#token_id ⇒ Object
Returns the value of attribute token_id.
30 31 32 |
# File 'lib/thron/gateway/base.rb', line 30 def token_id @token_id end |
Class Method Details
.client_id ⇒ Object
26 27 28 |
# File 'lib/thron/gateway/base.rb', line 26 def self.client_id @client_id ||= Config.thron.client_id end |
.service_name ⇒ Object
22 23 24 |
# File 'lib/thron/gateway/base.rb', line 22 def self.service_name self.name.split('::').last.downcase end |
Instance Method Details
#check_session ⇒ Object
36 37 38 |
# File 'lib/thron/gateway/base.rb', line 36 def check_session fail NoActiveSessionError, NO_ACTIVE_SESSION unless token_id end |
#client_id ⇒ Object
32 33 34 |
# File 'lib/thron/gateway/base.rb', line 32 def client_id self.class.client_id end |