Sha256: e5ff2a869a7be2990ab1ea31243722e0b72b1c6b1af81646f3b84dfb9c6df023

Contents?: true

Size: 517 Bytes

Versions: 1

Compression:

Stored size: 517 Bytes

Contents

Dir[File.expand_path("../helpers/*.rb", __FILE__)].each do |helper|
  require helper
end

module Docks
  module Helpers
    def self.add_helpers_to(renderer)
      return unless renderer.respond_to?(:helpers)

      renderer.helpers(*bundled_helpers)
      renderer.helpers(*Docks.config.theme.helpers) if Docks.config.has_theme?
      renderer.helpers(*Docks.config.helpers)
      renderer
    end

    def self.bundled_helpers
      @bundled_helpers ||= constants.map { |const| const_get(const) }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
docks_app-0.0.3 lib/docks/helpers.rb