Sha256: f51935dedbaeb82e7b3d4a861f225cebcd6ec749511348d3ab75d310acddcdd1

Contents?: true

Size: 573 Bytes

Versions: 28

Compression:

Stored size: 573 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

      # Handle aliasing of removed `@component` tags
      tag_name = "renders" if tag_name == "component"

      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

28 entries across 28 versions & 1 rubygems

Version Path
lookbook-2.3.4 lib/lookbook/tags/tag_provider.rb
lookbook-2.3.3 lib/lookbook/tags/tag_provider.rb
lookbook-2.3.2 lib/lookbook/tags/tag_provider.rb
lookbook-2.3.0 lib/lookbook/tags/tag_provider.rb
lookbook-2.2.2 lib/lookbook/tags/tag_provider.rb
lookbook-2.2.1 lib/lookbook/tags/tag_provider.rb
lookbook-2.2.0 lib/lookbook/tags/tag_provider.rb
lookbook-2.1.1 lib/lookbook/tags/tag_provider.rb
lookbook-2.1.0 lib/lookbook/tags/tag_provider.rb
lookbook-2.0.5 lib/lookbook/tags/tag_provider.rb
lookbook-2.0.4 lib/lookbook/tags/tag_provider.rb
lookbook-2.0.3 lib/lookbook/tags/tag_provider.rb
lookbook-2.0.2 lib/lookbook/tags/tag_provider.rb
lookbook-2.0.1 lib/lookbook/tags/tag_provider.rb
lookbook-2.0.0 lib/lookbook/tags/tag_provider.rb
lookbook-2.0.0.rc.3 lib/lookbook/tags/tag_provider.rb
lookbook-2.0.0.rc.2 lib/lookbook/tags/tag_provider.rb
lookbook-2.0.0.rc.1 lib/lookbook/tags/tag_provider.rb
lookbook-2.0.0.beta.9 lib/lookbook/tags/tag_provider.rb
lookbook-2.0.0.beta.8 lib/lookbook/tags/tag_provider.rb