Sha256: d7908b9011e34db339174a1c3cd8c554aeed0e38b513683a96e7be775742566c

Contents?: true

Size: 465 Bytes

Versions: 16

Compression:

Stored size: 465 Bytes

Contents

module Lookbook
  class TagProvider < ::YARD::Tags::Tag
    def self.new(tag_name, text, types = nil, name = nil)
      tag_name = tag_name.to_s

      if tag_name == "custom"
        raise NameError.new "'custom' is a reserved tag name and cannot be used"
      end

      begin
        tag_class = "Lookbook::#{tag_name.camelize}Tag".constantize
        tag_class.new(text)
      rescue NameError
        CustomTag.new(tag_name, text)
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
lookbook-1.5.5 lib/lookbook/tags/tag_provider.rb
lookbook-1.5.4 lib/lookbook/tags/tag_provider.rb
lookbook-1.5.3 lib/lookbook/tags/tag_provider.rb
lookbook-1.5.2 lib/lookbook/tags/tag_provider.rb
lookbook-1.5.1 lib/lookbook/tags/tag_provider.rb
lookbook-1.5.0 lib/lookbook/tags/tag_provider.rb
lookbook-1.4.5 lib/lookbook/tags/tag_provider.rb
lookbook-1.4.4 lib/lookbook/tags/tag_provider.rb
lookbook-1.4.3 lib/lookbook/tags/tag_provider.rb
lookbook-1.4.2 lib/lookbook/tags/tag_provider.rb
lookbook-1.4.1 lib/lookbook/tags/tag_provider.rb
lookbook-1.4.0 lib/lookbook/tags/tag_provider.rb
lookbook-1.3.4 lib/lookbook/tags/tag_provider.rb
lookbook-1.3.3 lib/lookbook/tags/tag_provider.rb
lookbook-1.3.1 lib/lookbook/tags/tag_provider.rb
lookbook-1.3.0 lib/lookbook/tags/tag_provider.rb