Sha256: a4317e2d6ace6e9d1ddef40c695ba87043a9f28e234e965e96be39a0140fa833

Contents?: true

Size: 735 Bytes

Versions: 8

Compression:

Stored size: 735 Bytes

Contents

# frozen_string_literal: true

require 'yard/tags/default_factory'
require 'puppet-strings/yard/tags/enum_tag'

# Factory for creating tags.
class PuppetStrings::Yard::Tags::Factory < YARD::Tags::DefaultFactory
  # Parses tag text and creates a new enum tag type. Modeled after
  # the parse_tag_with_options method in YARD::Tags::DefaultFactory.
  #
  # @param tag_name        the name of the tag to parse
  # @param [String] text   the raw tag text
  # @return [Tag]          a tag object with the tag_name, name, and nested Tag as type
  def parse_tag_with_enums(tag_name, text)
    name, text = *extract_name_from_text(text)
    PuppetStrings::Yard::Tags::EnumTag.new(tag_name, name, parse_tag_with_name(tag_name, text))
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
puppet-strings-4.1.3 lib/puppet-strings/yard/tags/factory.rb
puppet-strings-4.1.2 lib/puppet-strings/yard/tags/factory.rb
puppet-strings-4.1.1 lib/puppet-strings/yard/tags/factory.rb
puppet-strings-4.1.0 lib/puppet-strings/yard/tags/factory.rb
puppet-strings-4.0.0 lib/puppet-strings/yard/tags/factory.rb
puppet-strings-4.0.0.rc.1 lib/puppet-strings/yard/tags/factory.rb
puppet-strings-3.0.1 lib/puppet-strings/yard/tags/factory.rb
puppet-strings-3.0.0 lib/puppet-strings/yard/tags/factory.rb