Module: Mack::ViewHelpers

Defined in:
lib/mack/view_helpers/all_helpers.rb,
lib/mack/view_helpers/form_helpers.rb,
lib/mack/view_helpers/html_helpers.rb,
lib/mack/view_helpers/link_helpers.rb,
lib/mack/view_helpers/object_helpers.rb,
lib/mack/view_helpers/string_helpers.rb,
lib/mack/view_helpers/date_time_helpers.rb

Overview

:nodoc:

Defined Under Namespace

Modules: FormHelpers, HtmlHelpers, LinkHelpers, ObjectHelpers, StringHelpers

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

Used to easily include all Mack::ViewHelpers. It will NOT include itself! This is primarily used to aid in testing view helpers.



5
6
7
8
9
10
11
12
# File 'lib/mack/view_helpers/all_helpers.rb', line 5

def self.included(base)
  base.class_eval do
    Mack::ViewHelpers.constants.each do |c|
      mod = "Mack::ViewHelpers::#{c}".constantize
      include mod unless base.is_a?(mod)
    end
  end # class_eval
end