Sha256: 54f7193d862af810787044f687e5d7ec7a6a946a5de58ba10101c83da4bcc0d0

Contents?: true

Size: 1.47 KB

Versions: 1

Compression:

Stored size: 1.47 KB

Contents

module Druid
  module Elements
    class << self

      def type_to_class
        @type_to_class ||= {}
      end

      # method to return the collection of tag_name class mappings
      def tag_to_class
        @tag_to_class ||= {}
      end

      #
      # method to return the element for a tag_name
      #
      def element_class_for(tag_name, type=nil)
        return type_to_class[type.to_sym] if type
        tag_to_class[tag_name.to_sym] || Druid::Elements::Element
      end
    end
  end
end

require 'druid/elements/element'
require 'druid/elements/ordered_list'
require 'druid/elements/unordered_list'
require 'druid/elements/table'
require 'druid/elements/table_row'
require 'druid/elements/select_list'
require 'druid/elements/link'
require 'druid/elements/button'
require 'druid/elements/check_box'
require 'druid/elements/radio_button'
require 'druid/elements/text_field'
require 'druid/elements/div'
require 'druid/elements/table_cell'
require 'druid/elements/image'
require 'druid/elements/span'
require 'druid/elements/hidden_field'
require 'druid/elements/list_item'
require 'druid/elements/text_area'
require 'druid/elements/form'
require 'druid/elements/option'
require 'druid/elements/heading'
require 'druid/elements/paragraph'
require 'druid/elements/file_field'
require 'druid/elements/label'
require 'druid/elements/area'
require 'druid/elements/canvas'
require 'druid/elements/media'
require 'druid/elements/audio'
require 'druid/elements/video'
require 'druid/elements/bold'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
druid-ts-1.2.0 lib/druid/elements.rb