Sha256: 6459aef478559ccafbc78e863b68fe6810ed124f40c7dc04e3640fc6cf8ca549

Contents?: true

Size: 474 Bytes

Versions: 7

Compression:

Stored size: 474 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

7 entries across 7 versions & 1 rubygems

Version Path
mack-0.6.1.1 lib/mack/view_helpers/all_helpers.rb
mack-0.6.1.2 lib/mack/view_helpers/all_helpers.rb
mack-0.6.1 lib/mack/view_helpers/all_helpers.rb
mack-0.7.0 lib/mack/view_helpers/all_helpers.rb
mack-0.7.0.1 lib/mack/view_helpers/all_helpers.rb
mack-0.7.1.1 lib/mack/view_helpers/all_helpers.rb
mack-0.7.1 lib/mack/view_helpers/all_helpers.rb