Class: Yard::Lint::Parsers::Base
- Inherits:
-
Object
- Object
- Yard::Lint::Parsers::Base
- Defined in:
- lib/yard/lint/parsers/base.rb
Overview
Base class used for all the subparsers of a yard parser
Direct Known Subclasses
OneLineBase, TwoLineBase, Validators::Documentation::BlankLineBeforeDefinition::Parser, Validators::Documentation::EmptyCommentLine::Parser, Validators::Documentation::MarkdownSyntax::Parser, Validators::Documentation::MissingReturn::Parser, Validators::Documentation::UndocumentedBooleanMethods::Parser, Validators::Documentation::UndocumentedMethodArguments::Parser, Validators::Documentation::UndocumentedObjects::Parser, Validators::Documentation::UndocumentedOptions::Parser, Validators::Semantic::AbstractMethods::Parser, Validators::Tags::ApiTags::Parser, Validators::Tags::CollectionType::Parser, Validators::Tags::ExampleStyle::Parser, Validators::Tags::ExampleSyntax::Parser, Validators::Tags::ForbiddenTags::Parser, Validators::Tags::InformalNotation::Parser, Validators::Tags::InvalidTypes::Parser, Validators::Tags::MeaninglessTag::Parser, Validators::Tags::NonAsciiType::Parser, Validators::Tags::OptionTags::Parser, Validators::Tags::Order::Parser, Validators::Tags::RedundantParamDescription::Parser, Validators::Tags::TagGroupSeparator::Parser, Validators::Tags::TagTypePosition::Parser, Validators::Tags::TypeSyntax::Parser
Class Attribute Summary collapse
-
.regexps ⇒ Object
Returns the value of attribute regexps.
Instance Method Summary collapse
-
#match(string, regexp_name) ⇒ Array<String>
Array with extracted details or empty array if there’s nothing worth extracting.
Class Attribute Details
.regexps ⇒ Object
Returns the value of attribute regexps.
10 11 12 |
# File 'lib/yard/lint/parsers/base.rb', line 10 def regexps @regexps end |
Instance Method Details
#match(string, regexp_name) ⇒ Array<String>
Returns array with extracted details or empty array if there’s nothing worth extracting.
17 18 19 |
# File 'lib/yard/lint/parsers/base.rb', line 17 def match(string, regexp_name) string.match(self.class.regexps[regexp_name])&.captures || [] end |