Class: Tripletexer::Connection
- Inherits:
-
Object
- Object
- Tripletexer::Connection
- Defined in:
- lib/tripletexer/connection.rb
Constant Summary collapse
- ENDPOINT =
'https://tripletex.no/'
Instance Attribute Summary collapse
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
- #connection ⇒ Object
-
#initialize(object_class: Hash, proxy: nil) ⇒ Connection
constructor
A new instance of Connection.
- #reset ⇒ Object
Constructor Details
#initialize(object_class: Hash, proxy: nil) ⇒ Connection
Returns a new instance of Connection.
12 13 14 15 |
# File 'lib/tripletexer/connection.rb', line 12 def initialize(object_class: Hash, proxy: nil) @object_class = object_class @proxy = proxy end |
Instance Attribute Details
#token ⇒ Object
Returns the value of attribute token.
10 11 12 |
# File 'lib/tripletexer/connection.rb', line 10 def token @token end |
Instance Method Details
#connection ⇒ Object
17 18 19 20 |
# File 'lib/tripletexer/connection.rb', line 17 def connection return @connection if token && @connection @connection = init_connection end |
#reset ⇒ Object
22 23 24 25 26 |
# File 'lib/tripletexer/connection.rb', line 22 def reset @token = nil @connection = nil nil end |