Module: Transit::Extension::Loader
- Defined in:
- lib/transit/extension.rb
Overview
Methods included by each deliverable to provide extension loading functionality
Instance Method Summary (collapse)
-
- (Object) deliver_with(*args)
(also: #add_extension)
Deliverables can include a number of other packages and delivery options.
Instance Method Details
- (Object) deliver_with(*args) Also known as: add_extension
Deliverables can include a number of other packages and delivery options. To include them pass them to this method.
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/transit/extension.rb', line 50 def deliver_with(*args) = args..symbolize_keys! [args, .keys].flatten.compact.each do |arg| extname = arg.to_s.camelize unless Transit::Extension.const_defined?(extname) raise Transit::Extension::MissingExtensionError.new("The extension #{extname} could not be found.") end include Transit::Extension.const_get(extname) end end |