lib/hyde/utils.rb in hydeweb-0.0.2.pre vs lib/hyde/utils.rb in hydeweb-0.0.3.pre

- old
+ new

@@ -13,7 +13,16 @@ def force_file_open(filepath) require 'fileutils' FileUtils.mkdir_p File.dirname(filepath) File.new filepath, 'w' end + + # Returns all helper classes under the Hyde::Helpers module. + def get_helpers + Hyde::Helpers.constants.inject([]) do |a, constant| + mod = Hyde::Helpers.const_get(constant) + a << mod if mod.is_a? Module + a + end + end end end