module Bootinq::Mixins

When just required, hooks {Bootinq#enable_component} method to generate fast inline wrapping methods.

@see Mixins#enable_component

@example Usage

require 'bootinq'
require 'bootinq/mixins'

Constants

Builder

Public Instance Methods

enable_component(name, **opts) { |component_name, enabled| ... } click to toggle source

Generates {Enabled} or {Disabled} mixin and sets it to a constant once, bypassing if it has been already defined. @yield [component_name, enabled] @return [void]

Calls superclass method
# File lib/bootinq/mixins.rb, line 93
def enable_component(name, **opts)
  super(name, **opts) do |component_name, enabled|
    Bootinq.extend Builder[component_name, enabled]
    yield(component_name, enabled) if block_given?
  end
end