class Pipely::Deploy::BootstrapRegistry
Registry of Mixins to be applied to the bootstrap context
Public Class Methods
mixins()
click to toggle source
# File lib/pipely/deploy/bootstrap_registry.rb, line 22 def mixins instance.mixins end
new()
click to toggle source
# File lib/pipely/deploy/bootstrap_registry.rb, line 13 def initialize @mixins = [] end
register_mixins(*mixins)
click to toggle source
# File lib/pipely/deploy/bootstrap_registry.rb, line 18 def register_mixins(*mixins) instance.register_mixins(*mixins) end
Public Instance Methods
mixins()
click to toggle source
# File lib/pipely/deploy/bootstrap_registry.rb, line 40 def mixins @mixins end
register_mixins(*mixins)
click to toggle source
# File lib/pipely/deploy/bootstrap_registry.rb, line 27 def register_mixins(*mixins) new_mixins = [mixins].flatten.compact new_mixins.each do |mixin| begin require mixin.underscore rescue LoadError => e raise "Failed to require #{mixin} for bootstrap_contexts: #{e}" end end @mixins = (@mixins + new_mixins).uniq end