Class: Jerakia
- Inherits:
-
Object
- Object
- Jerakia
- Defined in:
- lib/jerakia.rb,
lib/jerakia/cli.rb,
lib/jerakia/util.rb,
lib/jerakia/error.rb,
lib/jerakia/answer.rb,
lib/jerakia/policy.rb,
lib/jerakia/server.rb,
lib/jerakia/request.rb,
lib/jerakia/version.rb,
lib/jerakia/launcher.rb,
lib/jerakia/cli/token.rb,
lib/jerakia/cli/lookup.rb,
lib/jerakia/cli/server.rb,
lib/jerakia/datasource.rb,
lib/jerakia/dsl/lookup.rb,
lib/jerakia/dsl/policy.rb,
lib/jerakia/server/auth.rb,
lib/jerakia/server/rest.rb,
lib/jerakia/policy/registry.rb,
lib/jerakia/server/auth/token.rb,
lib/jerakia/lookup/plugin_config.rb
Overview
Jerakia::Lookup::PluginConfig
This class is a simple wrapper class to expose configuration options from the global configuration file to lookup plugins. It’s exposed to the lookup as the config method. Eg: config
Defined Under Namespace
Modules: Dsl, Util Classes: Answer, CLI, Cache, Config, Datasource, Error, FileParseError, Launcher, Log, Lookup, Policy, PolicyError, Request, Response, Schema, SchemaError, Scope, Server
Constant Summary collapse
- VERSION =
Public API to retrieve the latest released version of the code
This should be updated when a new gem is released and it is read from the gemspec file
'1.2.1'.freeze
Class Attribute Summary collapse
-
.config ⇒ Object
Returns the value of attribute config.
-
.log ⇒ Object
Returns the value of attribute log.
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
- #config ⇒ Object
-
#initialize(options = {}) ⇒ Jerakia
constructor
A new instance of Jerakia.
- #log ⇒ Object
- #lookup(request) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Jerakia
Returns a new instance of Jerakia.
27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/jerakia.rb', line 27 def initialize( = {}) @options = load_config load_log_handler if config[:plugindir] $LOAD_PATH << config[:plugindir] unless $LOAD_PATH.include?(config[:plugindir]) end log.debug('Jerakia initialized') Jerakia.log.verbose("Jerakia started. Version #{Jerakia::VERSION}") end |
Class Attribute Details
.config ⇒ Object
Returns the value of attribute config.
20 21 22 |
# File 'lib/jerakia.rb', line 20 def config @config end |
.log ⇒ Object
Returns the value of attribute log.
21 22 23 |
# File 'lib/jerakia.rb', line 21 def log @log end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
17 18 19 |
# File 'lib/jerakia.rb', line 17 def @options end |
Class Method Details
Instance Method Details
#config ⇒ Object
57 58 59 |
# File 'lib/jerakia.rb', line 57 def config self.class.config end |
#log ⇒ Object
61 62 63 |
# File 'lib/jerakia.rb', line 61 def log self.class.log end |