Module: Cts::Mpx::Driver
- Included in:
- Entries
- Defined in:
- lib/cts/mpx/driver.rb,
lib/cts/mpx/service.rb,
lib/cts/mpx/driver/page.rb,
lib/cts/mpx/driver/helpers.rb,
lib/cts/mpx/driver/request.rb,
lib/cts/mpx/driver/response.rb,
lib/cts/mpx/driver/assemblers.rb,
lib/cts/mpx/driver/exceptions.rb,
lib/cts/mpx/driver/connections.rb
Overview
responsible for low level calls to MPX
Defined Under Namespace
Modules: Assemblers, Connections, Exceptions, Helpers Classes: ConnectionError, CredentialsError, Page, Request, Response, Service, ServiceError, TokenError
Class Method Summary collapse
-
.config_dir ⇒ String
path to our config files.
-
.gem_dir ⇒ String
path to our gem directory, includes support for bundled env’s.
-
.parse_json(string) ⇒ Hash
load a json file into a simple hash.
Class Method Details
.config_dir ⇒ String
path to our config files
33 34 35 |
# File 'lib/cts/mpx/driver.rb', line 33 def config_dir "#{gem_dir}/config" end |
.gem_dir ⇒ String
path to our gem directory, includes support for bundled env’s.
25 26 27 28 29 |
# File 'lib/cts/mpx/driver.rb', line 25 def gem_dir return Dir.pwd unless Gem.loaded_specs.include? 'cts-mpx' Gem.loaded_specs['cts-mpx'].full_gem_path end |
.parse_json(string) ⇒ Hash
load a json file into a simple hash
42 43 44 45 46 |
# File 'lib/cts/mpx/driver.rb', line 42 def parse_json(string) Oj.compat_load string rescue Oj::ParseError => exception raise "#{string}: #{exception.}" end |