Class: Amrita::TagInfo

Class Amrita::TagInfo |
In: | lib/amrita/tag.rb
Parent: | Object

This class provide information for formatting.

Methods

freeze get_tag_info new

Classes and Modules

Class Amrita::TagInfo::TagInfoItem

Public Class methods

new()

    # File lib/amrita/tag.rb, line 111
        def initialize
          @dict = Hash.new(DefaultTagInfo)
        end

Public Instance methods

freeze()

    # File lib/amrita/tag.rb, line 115
        def freeze
          @dict.each do |k,v|
            k.freeze
            v.freeze
          end
          self
        end

get_tag_info(tagname)

    # File lib/amrita/tag.rb, line 123
        def get_tag_info(tagname)
          case tagname
          when Symbol
          when String
            tagname = tagname.downcase.intern
          else
            tagname = tagname.to_s.downcase.intern
          end
          if @dict.has_key?(tagname)
            @dict[tagname]
          else
            @dict[tagname] = TagInfoItem.new(tagname)
          end
        end