Sha256: 7bd80682b405b77b08c13411874fd0fd08c81d7bd4eaf45fc0ce64da9f096ee8

Contents?: true

Size: 487 Bytes

Versions: 7

Compression:

Stored size: 487 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}.each do |e|
  require "hirb/helpers/#{e}"
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
hirb-0.5.0 lib/hirb/helpers.rb
hirb-0.4.5 lib/hirb/helpers.rb
hirb-0.4.4 lib/hirb/helpers.rb
hirb-0.4.3 lib/hirb/helpers.rb
hirb-0.4.2 lib/hirb/helpers.rb
hirb-0.4.1 lib/hirb/helpers.rb
hirb-0.4.0 lib/hirb/helpers.rb