Module: Docks::Helpers
- Defined in:
- lib/docks/helpers.rb,
lib/docks/helpers/path_helper.rb,
lib/docks/helpers/github_helper.rb,
lib/docks/helpers/render_helper.rb
Defined Under Namespace
Modules: Github, Path, Render
Class Method Summary
collapse
Class Method Details
.add_helpers_to(renderer) ⇒ Object
7
8
9
10
11
12
13
14
|
# File 'lib/docks/helpers.rb', line 7
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
|
.bundled_helpers ⇒ Object
16
17
18
|
# File 'lib/docks/helpers.rb', line 16
def self.bundled_helpers
@bundled_helpers ||= constants.map { |const| const_get(const) }
end
|