Module: Jackal
- Defined in:
- lib/jackal.rb,
lib/jackal/error.rb,
lib/jackal/utils.rb,
lib/jackal/loader.rb,
lib/jackal/version.rb,
lib/jackal/callback.rb,
lib/jackal/formatter.rb,
lib/jackal/utils/spec.rb,
lib/jackal/utils/config.rb,
lib/jackal/utils/events.rb,
lib/jackal/utils/payload.rb,
lib/jackal/utils/process.rb,
lib/jackal/utils/http_api.rb,
lib/jackal/utils/constants.rb,
lib/jackal/utils/spec/generator.rb,
lib/jackal/utils/spec/callback_local.rb
Defined Under Namespace
Modules: Utils Classes: Callback, Error, Formatter, Loader, ServiceInformation
Constant Summary collapse
- VERSION =
Current library version
Gem::Version.new('0.5.0')
Class Method Summary collapse
-
.service(name, args = {}) ⇒ NilClass
Add service information.
-
.service_info ⇒ Smash
Registered service info.
Class Method Details
.service(name, args = {}) ⇒ NilClass
Add service information
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/jackal.rb', line 38 def self.service(name, args={}) name = name.to_s if(@services[name]) new_config = ServiceInformation.new(args.merge(:name => name)) @services[name] = ServiceInformation.new( @services[name].data.merge( :configuration => ( @services[name].data[:configuration] | new_config.data[:configuration] ) ) ) else @services[name] = ServiceInformation.new(args.merge(:name => name)) end nil end |
.service_info ⇒ Smash
Returns registered service info.
57 58 59 |
# File 'lib/jackal.rb', line 57 def self.service_info @services.to_smash end |