Files

Merb::Helpers

Constants

VERSION

Public Class Methods

load() click to toggle source
    # File lib/merb-helpers.rb, line 10
10:     def self.load
11: 
12:       require 'merb-helpers/time_dsl'
13:       require 'merb-helpers/core_ext'
14:       require 'merb-helpers/core_ext/numeric'
15: 
16:       if Merb::Plugins.config[:merb_helpers]
17:         config = Merb::Plugins.config[:merb_helpers]
18: 
19:         if config[:include] && !config[:include].empty?
20:           load_helpers(config[:include])
21:         else
22:           # This is in case someone defines an entry in the config,
23:           # but doesn't put in a with or without option
24:           load_helpers
25:         end
26: 
27:       else
28:         load_helpers
29:       end
30:     end
load_helpers(helpers = @@helpers_files) click to toggle source

Load only specific helpers instead of loading all the helpers

    # File lib/merb-helpers.rb, line 33
33:     def self.load_helpers(helpers = @@helpers_files)
34:       helpers = helpers.is_a?(Array) ? helpers : [helpers]
35:       helpers.each {|helper| Kernel.load(File.join(@@helpers_dir, "#{helper}.rb") )} # using load here allows specs to work
36:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.