Class: CSVPP::FormatsClient
- Inherits:
-
Object
- Object
- CSVPP::FormatsClient
- Includes:
- HTTParty
- Defined in:
- lib/csvpp/formats_client.rb
Constant Summary collapse
- DEFAULT_HOST =
'http://formats.iapps.swissdrg.local'
Instance Method Summary collapse
-
#base_uri ⇒ String
E.g.
- #format(name) ⇒ Format
- #formats ⇒ Array<Format>
-
#initialize(host: DEFAULT_HOST) ⇒ FormatsClient
constructor
A new instance of FormatsClient.
Constructor Details
#initialize(host: DEFAULT_HOST) ⇒ FormatsClient
Returns a new instance of FormatsClient.
11 12 13 |
# File 'lib/csvpp/formats_client.rb', line 11 def initialize(host: DEFAULT_HOST) self.class.base_uri ENV['FORMATS_HOST'] || host end |
Instance Method Details
#base_uri ⇒ String
Returns e.g. “formats.iapps.swissdrg.local”.
16 17 18 |
# File 'lib/csvpp/formats_client.rb', line 16 def base_uri self.class.base_uri end |