Sha256: 4243370ce4d2bcacad6f0465431b21582c2a8786fed6609ea7835144b429a3e3

Contents?: true

Size: 473 Bytes

Versions: 4

Compression:

Stored size: 473 Bytes

Contents

module Mack
  module ViewHelpers # :nodoc:
    # Used to easily include all Mack::ViewHelpers. It will NOT include itself!
    # This is primarily used to aid in testing view helpers.
    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 # included
    
  end # ViewHelpers
end # Mack

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mack-0.8.1 lib/mack/view_helpers/all_helpers.rb
mack-0.8.2 lib/mack/view_helpers/all_helpers.rb
mack-0.8.3 lib/mack/view_helpers/all_helpers.rb
mack-0.8.3.1 lib/mack/view_helpers/all_helpers.rb