Module: Heracles::Wrapper
- Extended by:
- Morphine
- Defined in:
- lib/heracles-wrapper.rb,
lib/heracles-wrapper/config.rb,
lib/heracles-wrapper/request.rb,
lib/heracles-wrapper/version.rb,
lib/heracles-wrapper/exceptions.rb,
lib/heracles-wrapper/test_helper.rb,
lib/heracles-wrapper/request_success.rb,
lib/heracles-wrapper/request/create_job.rb,
lib/heracles-wrapper/notification_response.rb,
lib/rails/generators/heracles/wrapper/install/install_generator.rb,
lib/rails/generators/heracles/wrapper/notification_response/notification_response_generator.rb
Defined Under Namespace
Modules: Request, TestHelper
Classes: Config, ConfigurationError, InstallGenerator, NotificationResponse, NotificationResponseGenerator, RequestFailure, RequestSuccess
Constant Summary
collapse
- HERACLES_BASE_URL =
'https://heracles.library.nd.edu'.freeze
- VERSION =
"0.0.3"
- DefaultErrorObject =
Hash
Class Method Summary
collapse
Class Method Details
.clear_config! ⇒ Object
23
24
25
|
# File 'lib/heracles-wrapper.rb', line 23
def clear_config!
@config = nil
end
|
.config ⇒ Object
13
14
15
16
17
18
19
20
21
|
# File 'lib/heracles-wrapper.rb', line 13
def config
if @config.nil?
raise ConfigurationError.new("#{self}.config not set")
end
if @config.api_key.nil?
raise ConfigurationError.new("#{self}.config.api_key is invalid")
end
@config
end
|
9
10
11
|
# File 'lib/heracles-wrapper.rb', line 9
def configure(&block)
@config = Config.new(&block)
end
|
.service(service_name, options = {}) ⇒ Object
27
28
29
|
# File 'lib/heracles-wrapper.rb', line 27
def service(service_name, options = {})
send("#{service_name}_service").call(config,options)
end
|