decko-commons/decko

View on GitHub
mod/bootstrap/lib/card/bootstrapper.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
class Card
  module Bootstrapper
    extend Bootstrap::ComponentLoader

    def bootstrap
      @bootstrap ||= Bootstrap.new(self)
    end

    def bs *args, &block
      bootstrap.render(*args, &block)
    end

    components.each do |component|
      delegate component, to: :bootstrap, prefix: :bs
    end
  end
end