Module: StaticMatic::HelpersMixin

### Home Classes Methods

### In Files

- lib/staticmatic/mixins/helpers.rb

### Methods

- #load_helper
- #load_helpers

### Files

- LICENSE

### Class/Module Index

Quicksearch

- StaticMatic
- StaticMatic::Base
- StaticMatic::BuildMixin
- StaticMatic::Configuration
- StaticMatic::Error
- StaticMatic::Helpers
- StaticMatic::Helpers::AssetsHelper
- StaticMatic::Helpers::CurrentPathHelper
- StaticMatic::Helpers::FormHelper
- StaticMatic::Helpers::RenderHelper
- StaticMatic::Helpers::TagHelper
- StaticMatic::Helpers::UrlHelper
- StaticMatic::HelpersMixin
- StaticMatic::RenderMixin
- StaticMatic::RescueMixin
- StaticMatic::Server
- StaticMatic::ServerMixin
- StaticMatic::SetupMixin
- StaticMatic::TemplateError
- Compass
- Compass::AppIntegration
- Compass::AppIntegration::Staticmatic
- Compass::AppIntegration::Staticmatic::ConfigurationDefaults
- Compass::AppIntegration::Staticmatic::Installer

No matching classes.

# StaticMatic::HelpersMixin

### Public Instance Methods

load_helper(helper) click to toggle source

    # File lib/staticmatic/mixins/helpers.rb, line 10
    def load_helper(helper)
      load helper
      module_name = File.basename(helper, '.rb').gsub(/(^|\_)./) { |c| c.upcase }.gsub(/\_/, '')
      Haml::Helpers.class_eval("include #{module_name}")
    end

load_helpers() click to toggle source

Loads any helpers present in the helpers dir and mixes them into the template helpers

    # File lib/staticmatic/mixins/helpers.rb, line 3
    def load_helpers

      Dir["#{@src_dir}/helpers/**/*_helper.rb"].each do |helper|
        load_helper(helper)
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.