Module: Tankerkoenig
- Defined in:
- lib/tankerkoenig.rb,
lib/tankerkoenig/price.rb,
lib/tankerkoenig/station.rb,
lib/tankerkoenig/version.rb,
lib/tankerkoenig/response.rb,
lib/tankerkoenig/opening_time.rb
Defined Under Namespace
Classes: OpeningTime, Price, Response, Station
Constant Summary collapse
- VERSION =
'0.1.0'
Class Attribute Summary collapse
-
.api_base ⇒ Object
Returns the value of attribute api_base.
-
.api_key ⇒ Object
Returns the value of attribute api_key.
Class Method Summary collapse
Class Attribute Details
.api_base ⇒ Object
Returns the value of attribute api_base.
12 13 14 |
# File 'lib/tankerkoenig.rb', line 12 def api_base @api_base end |
.api_key ⇒ Object
Returns the value of attribute api_key.
12 13 14 |
# File 'lib/tankerkoenig.rb', line 12 def api_key @api_key end |
Class Method Details
.conn ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/tankerkoenig.rb', line 15 def self.conn if defined?(@conn) @conn else @conn = Faraday.new(@api_base) do |faraday| faraday.params['apikey'] = @api_key faraday.adapter Faraday.default_adapter end end end |
.conn=(conn) ⇒ Object
26 27 28 |
# File 'lib/tankerkoenig.rb', line 26 def self.conn=(conn) @conn = conn end |