Sha256: e848012c5acc1f673ae389a68b7f296700a52715c493a3418025952e2c3572dd

Contents?: true

Size: 497 Bytes

Versions: 7

Compression:

Stored size: 497 Bytes

Contents

module Hirb
  module Helpers #:nodoc:
    @helper_classes ||= {}
    def self.helper_class(klass)
      @helper_classes[klass.to_s] ||= begin
        if (helper_class = constants.find {|e| e.to_s == Util.camelize(klass.to_s)})
          klass = "Hirb::Helpers::#{helper_class}"
        end
        Util.any_const_get(klass)
      end
    end
  end
end

%w{table object_table auto_table tree parent_child_tree vertical_table
  unicode_table tab_table}.each do |e|
  require "hirb/helpers/#{e}"
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
hirb-0.6.2 lib/hirb/helpers.rb
hirb-0.6.1 lib/hirb/helpers.rb
hsume2-hirb-0.6.3 lib/hirb/helpers.rb
hsume2-hirb-0.6.2 lib/hirb/helpers.rb
hsume2-hirb-0.6.1 lib/hirb/helpers.rb
hsume2-hirb-0.6.0.beta.1 lib/hirb/helpers.rb
hirb-0.6.0 lib/hirb/helpers.rb