Class: YARD::Aggredator::IncludeDirective
- Inherits:
-
ReferenceableDirective
- Object
- Tags::Directive
- ReferenceableDirective
- YARD::Aggredator::IncludeDirective
- Defined in:
- lib/yard/aggredator/plugin.rb
Instance Attribute Summary
Attributes inherited from ReferenceableDirective
Instance Method Summary collapse
Methods inherited from ReferenceableDirective
#call, #detect_reference, #directives_from_reference, #initialize, #name, #reference?
Constructor Details
This class inherits a constructor from YARD::Aggredator::ReferenceableDirective
Instance Method Details
#expand ⇒ Object
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 |
# File 'lib/yard/aggredator/plugin.rb', line 279 def if reference? result = if (r = directives_from_reference.first&.) r else "<code>see [#{name}] #{reference}</code>" end return result end root = YARD::Registry.send(:thread_local_store).file.to_s if (finded = Aggredator::Helper.find_static_file(tag.text.to_s, root: root)) "{include:file:#{finded}}" else "<code>@!include #{tag.text}</code>" end end |