repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/decorator_handler_methods.rb
lib/yard/handlers/ruby/decorator_handler_methods.rb
# frozen_string_literal: true # Helper methods to assist with processing decorators. module YARD::Handlers::Ruby::DecoratorHandlerMethods # @overload process_decorator(*nodes, opts = {}, &block) # Takes care of parsing method definitions passed to decorators # as parameters, as well as parsing chained decorat...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/yield_handler.rb
lib/yard/handlers/ruby/yield_handler.rb
# frozen_string_literal: true # Handles 'yield' calls class YARD::Handlers::Ruby::YieldHandler < YARD::Handlers::Ruby::Base handles :yield, :yield0 process do return unless owner.is_a?(MethodObject) # Only methods yield return if owner.has_tag? :yield # Don't override yield tags return if owner...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/class_variable_handler.rb
lib/yard/handlers/ruby/class_variable_handler.rb
# frozen_string_literal: true # Handles a class variable (@@variable) class YARD::Handlers::Ruby::ClassVariableHandler < YARD::Handlers::Ruby::Base handles :assign namespace_only process do if statement[0].type == :var_field && statement[0][0].type == :cvar name = statement[0][0][0] value = state...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/base.rb
lib/yard/handlers/ruby/base.rb
# frozen_string_literal: true module YARD module Handlers module Ruby # To implement a custom handler matcher, subclass this class and implement # {#matches?} to return whether a node matches the handler. # # @example A Custom Handler Matcher Extension # # Implements a handler that...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/visibility_handler.rb
lib/yard/handlers/ruby/visibility_handler.rb
# frozen_string_literal: true # Handles 'private', 'protected', and 'public' calls. class YARD::Handlers::Ruby::VisibilityHandler < YARD::Handlers::Ruby::Base include YARD::Handlers::Ruby::DecoratorHandlerMethods handles method_call(:private) handles method_call(:protected) handles method_call(:public) names...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/method_condition_handler.rb
lib/yard/handlers/ruby/method_condition_handler.rb
# frozen_string_literal: true # Handles a conditional inside a method class YARD::Handlers::Ruby::MethodConditionHandler < YARD::Handlers::Ruby::Base handles :if_mod, :unless_mod process do parse_block(statement.then_block, :owner => owner) end end
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/private_class_method_handler.rb
lib/yard/handlers/ruby/private_class_method_handler.rb
# frozen_string_literal: true # Sets visibility of a class method to private. class YARD::Handlers::Ruby::PrivateClassMethodHandler < YARD::Handlers::Ruby::Base include YARD::Handlers::Ruby::DecoratorHandlerMethods handles method_call(:private_class_method) namespace_only process do process_decorator :sco...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/private_constant_handler.rb
lib/yard/handlers/ruby/private_constant_handler.rb
# frozen_string_literal: true module YARD module Handlers module Ruby # Sets visibility of a constant (class, module, const) class PrivateConstantHandler < YARD::Handlers::Ruby::Base handles method_call(:private_constant) namespace_only process do errors = [] ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/dsl_handler_methods.rb
lib/yard/handlers/ruby/dsl_handler_methods.rb
# frozen_string_literal: true module YARD module Handlers module Ruby module DSLHandlerMethods include CodeObjects include Parser IGNORE_METHODS = Hash[*%w(alias alias_method autoload attr attr_accessor attr_reader attr_writer extend include module_function public private ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/class_handler.rb
lib/yard/handlers/ruby/class_handler.rb
# frozen_string_literal: true # Handles class declarations class YARD::Handlers::Ruby::ClassHandler < YARD::Handlers::Ruby::Base include YARD::Handlers::Ruby::StructHandlerMethods handles :class, :sclass namespace_only process do classname = statement[0].source.gsub(/\s/, '') if statement.type == :clas...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/module_function_handler.rb
lib/yard/handlers/ruby/module_function_handler.rb
# frozen_string_literal: true # Handles module_function calls to turn methods into public class methods. # Also creates a private instance copy of the method. class YARD::Handlers::Ruby::ModuleFunctionHandler < YARD::Handlers::Ruby::Base include YARD::Handlers::Ruby::DecoratorHandlerMethods handles method_call(:mo...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/attribute_handler.rb
lib/yard/handlers/ruby/attribute_handler.rb
# frozen_string_literal: true # Handles +attr_*+ statements in modules/classes class YARD::Handlers::Ruby::AttributeHandler < YARD::Handlers::Ruby::Base handles method_call(:attr) handles method_call(:attr_reader) handles method_call(:attr_writer) handles method_call(:attr_accessor) namespace_only process ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/extend_handler.rb
lib/yard/handlers/ruby/extend_handler.rb
# frozen_string_literal: true # Handles 'extend' call to include modules into the class scope of another # @see MixinHandler class YARD::Handlers::Ruby::ExtendHandler < YARD::Handlers::Ruby::MixinHandler handles method_call(:extend) namespace_only def scope; :class end private def process_mixin(mixin) ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/exception_handler.rb
lib/yard/handlers/ruby/exception_handler.rb
# frozen_string_literal: true # Handles 'raise' calls inside methods class YARD::Handlers::Ruby::ExceptionHandler < YARD::Handlers::Ruby::Base handles method_call(:raise) process do return unless owner.is_a?(MethodObject) # Only methods yield return if [:command_call, :call].include? statement.type ret...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/legacy/constant_handler.rb
lib/yard/handlers/ruby/legacy/constant_handler.rb
# frozen_string_literal: true # (see Ruby::ConstantHandler) class YARD::Handlers::Ruby::Legacy::ConstantHandler < YARD::Handlers::Ruby::Legacy::Base include YARD::Handlers::Ruby::StructHandlerMethods HANDLER_MATCH = /\A[A-Z]\w*\s*=[^=]\s*/m handles HANDLER_MATCH namespace_only process do name, value = *s...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/legacy/module_handler.rb
lib/yard/handlers/ruby/legacy/module_handler.rb
# frozen_string_literal: true # (see Ruby::ModuleHandler) class YARD::Handlers::Ruby::Legacy::ModuleHandler < YARD::Handlers::Ruby::Legacy::Base handles TkMODULE namespace_only process do modname = statement.tokens.to_s[/^module\s+(#{NAMESPACEMATCH})/, 1] mod = register ModuleObject.new(namespace, modnam...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/legacy/class_condition_handler.rb
lib/yard/handlers/ruby/legacy/class_condition_handler.rb
# frozen_string_literal: true # (see Ruby::ClassConditionHandler) # @since 0.5.4 class YARD::Handlers::Ruby::Legacy::ClassConditionHandler < YARD::Handlers::Ruby::Legacy::Base namespace_only handles TkIF, TkELSIF, TkUNLESS process do condition = parse_condition if condition.nil? # Parse both blocks...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/legacy/comment_handler.rb
lib/yard/handlers/ruby/legacy/comment_handler.rb
# frozen_string_literal: true # (see Ruby::CommentHandler) class YARD::Handlers::Ruby::Legacy::CommentHandler < YARD::Handlers::Ruby::Legacy::Base handles TkCOMMENT namespace_only process do register_docstring(nil) end end
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/legacy/method_handler.rb
lib/yard/handlers/ruby/legacy/method_handler.rb
# frozen_string_literal: true # (see Ruby::MethodHandler) class YARD::Handlers::Ruby::Legacy::MethodHandler < YARD::Handlers::Ruby::Legacy::Base handles TkDEF process do nobj = namespace mscope = scope if statement.tokens.to_s =~ /^def\s+(#{METHODMATCH})(?:(?:\s+|\s*\()(.*)(?:\)\s*$)?)?/m meth =...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/legacy/dsl_handler.rb
lib/yard/handlers/ruby/legacy/dsl_handler.rb
# frozen_string_literal: true module YARD module Handlers module Ruby module Legacy # (see Ruby::DSLHandler) class DSLHandler < Base include CodeObjects include DSLHandlerMethods handles TkIDENTIFIER namespace_only process { handle_comments }...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/legacy/mixin_handler.rb
lib/yard/handlers/ruby/legacy/mixin_handler.rb
# frozen_string_literal: true # (see Ruby::MixinHandler) class YARD::Handlers::Ruby::Legacy::MixinHandler < YARD::Handlers::Ruby::Legacy::Base handles(/\Ainclude(\s|\()/) namespace_only process do errors = [] statement.tokens[1..-1].to_s.split(/\s*,\s*/).reverse.each do |mixin| mixin = mixin.strip ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/legacy/alias_handler.rb
lib/yard/handlers/ruby/legacy/alias_handler.rb
# frozen_string_literal: true # (see Ruby::AliasHandler) class YARD::Handlers::Ruby::Legacy::AliasHandler < YARD::Handlers::Ruby::Legacy::Base handles(/\Aalias(_method)?(\s|\()/) namespace_only process do if TkALIAS === statement.tokens.first tokens = statement.tokens[2..-1].to_s.split(/\s+/) nam...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/legacy/yield_handler.rb
lib/yard/handlers/ruby/legacy/yield_handler.rb
# frozen_string_literal: true # (see Ruby::YieldHandler) class YARD::Handlers::Ruby::Legacy::YieldHandler < YARD::Handlers::Ruby::Legacy::Base handles TkYIELD process do return unless owner.is_a?(MethodObject) # Only methods yield return if owner.has_tag? :yield # Don't override yield tags retu...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/legacy/class_variable_handler.rb
lib/yard/handlers/ruby/legacy/class_variable_handler.rb
# frozen_string_literal: true # (see Ruby::ClassVariableHandler) class YARD::Handlers::Ruby::Legacy::ClassVariableHandler < YARD::Handlers::Ruby::Legacy::Base HANDLER_MATCH = /\A@@\w+\s*=\s*/m handles HANDLER_MATCH namespace_only process do name, value = *statement.tokens.to_s.split(/\s*=\s*/, 2) regis...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/legacy/base.rb
lib/yard/handlers/ruby/legacy/base.rb
# frozen_string_literal: true module YARD module Handlers module Ruby::Legacy # This is the base handler for the legacy parser. To implement a legacy # handler, subclass this class. # # @abstract (see Ruby::Base) class Base < Handlers::Base # For tokens like TkDEF, TkCLASS, e...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/legacy/visibility_handler.rb
lib/yard/handlers/ruby/legacy/visibility_handler.rb
# frozen_string_literal: true # (see Ruby::VisibilityHandler) class YARD::Handlers::Ruby::Legacy::VisibilityHandler < YARD::Handlers::Ruby::Legacy::Base handles(/\A(protected|private|public)(\s|\(|$)/) namespace_only process do vis = statement.tokens.first.text if statement.tokens.size == 1 self.vi...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/legacy/private_class_method_handler.rb
lib/yard/handlers/ruby/legacy/private_class_method_handler.rb
# frozen_string_literal: true # (see Ruby::PrivateClassMethodHandler) class YARD::Handlers::Ruby::Legacy::PrivateClassMethodHandler < YARD::Handlers::Ruby::Legacy::Base handles(/\Aprivate_class_method(\s|\(|$)/) namespace_only process do tokval_list(statement.tokens[2..-1], :attr).each do |name| privat...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/legacy/private_constant_handler.rb
lib/yard/handlers/ruby/legacy/private_constant_handler.rb
# frozen_string_literal: true # (see Ruby::PrivateConstantHandler) class YARD::Handlers::Ruby::Legacy::PrivateConstantHandler < YARD::Handlers::Ruby::Legacy::Base handles(/\Aprivate_constant(\s|\(|$)/) namespace_only process do tokval_list(statement.tokens[2..-1], :attr, TkCONSTANT).each do |name| priv...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/legacy/class_handler.rb
lib/yard/handlers/ruby/legacy/class_handler.rb
# frozen_string_literal: true # (see Ruby::ClassHandler) class YARD::Handlers::Ruby::Legacy::ClassHandler < YARD::Handlers::Ruby::Legacy::Base include YARD::Handlers::Ruby::StructHandlerMethods handles TkCLASS namespace_only process do if statement.tokens.to_s =~ /^class\s+(#{NAMESPACEMATCH})\s*(?:<\s*(.+)...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/legacy/module_function_handler.rb
lib/yard/handlers/ruby/legacy/module_function_handler.rb
# frozen_string_literal: true # (see Ruby::ModuleFunctionHandler) class YARD::Handlers::Ruby::Legacy::ModuleFunctionHandler < YARD::Handlers::Ruby::Legacy::Base handles(/\A(module_function)(\s|\(|$)/) namespace_only process do if statement.tokens.size == 1 self.scope = :module else tokval_lis...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/legacy/attribute_handler.rb
lib/yard/handlers/ruby/legacy/attribute_handler.rb
# frozen_string_literal: true # (see Ruby::AttributeHandler) class YARD::Handlers::Ruby::Legacy::AttributeHandler < YARD::Handlers::Ruby::Legacy::Base handles(/\Aattr(?:_(?:reader|writer|accessor))?(?:\s|\()/) namespace_only process do begin attr_type = statement.tokens.first.text.to_sym symbol...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/legacy/extend_handler.rb
lib/yard/handlers/ruby/legacy/extend_handler.rb
# frozen_string_literal: true # (see Ruby::ExtendHandler) class YARD::Handlers::Ruby::Legacy::ExtendHandler < YARD::Handlers::Ruby::Legacy::MixinHandler handles(/\Aextend(\s|\()/) namespace_only def scope; :class end private def process_mixin(mixin) if mixin == "self" if namespace.is_a?(ClassObje...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/legacy/exception_handler.rb
lib/yard/handlers/ruby/legacy/exception_handler.rb
# frozen_string_literal: true # (see Ruby::ExceptionHandler) class YARD::Handlers::Ruby::Legacy::ExceptionHandler < YARD::Handlers::Ruby::Legacy::Base handles(/\Araise(\s|\(|\Z)/) process do return unless owner.is_a?(MethodObject) # Only methods yield return if owner.has_tag?(:raise) klass = statement...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/templates/section.rb
lib/yard/templates/section.rb
# frozen_string_literal: true module YARD module Templates # Abstracts the structure for a section and its subsections into an ordered # list of sections and subsections. # @since 0.6.0 class Section < Array attr_accessor :name def initialize(name, *args) self.name = name ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/templates/template_options.rb
lib/yard/templates/template_options.rb
# frozen_string_literal: true module YARD module Templates # An Options class containing default options for base template rendering. For # options specific to generation of HTML output, see {CLI::YardocOptions}. # # @see CLI::YardocOptions class TemplateOptions < YARD::Options # @return [S...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/templates/template.rb
lib/yard/templates/template.rb
# frozen_string_literal: true require 'erb' module YARD module Templates module Template attr_accessor :class, :section attr_reader :options class << self # Extra includes are mixins that are included after a template is created. These # mixins can be registered by plugins to o...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/templates/engine.rb
lib/yard/templates/engine.rb
# frozen_string_literal: true module YARD module Templates # This module manages all creation, handling and rendering of {Template} # objects. # # * To create a template object at a path, use {template}. # * To render a template, call {render}. # * To register a template path in the lookup pa...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/templates/erb_cache.rb
lib/yard/templates/erb_cache.rb
# frozen_string_literal: true module YARD module Templates # @since 0.5.4 module ErbCache def self.method_for(filename) @methods ||= {} return @methods[filename] if @methods[filename] @methods[filename] = name = "_erb_cache_#{@methods.size}" erb = yield.src encodi...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/templates/helpers/markup_helper.rb
lib/yard/templates/helpers/markup_helper.rb
# frozen_string_literal: true require 'rubygems' module YARD module Templates::Helpers # Helper methods for loading and managing markup types. module MarkupHelper class << self # Clears the markup provider cache information. Mainly used for testing. # @return [void] def clear_ma...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/templates/helpers/html_syntax_highlight_helper.rb
lib/yard/templates/helpers/html_syntax_highlight_helper.rb
# frozen_string_literal: true module YARD module Templates module Helpers # Helper methods for syntax highlighting. module HtmlSyntaxHighlightHelper include ModuleHelper # Highlights Ruby source # @param [String] source the Ruby source code # @return [String] the highl...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/templates/helpers/module_helper.rb
lib/yard/templates/helpers/module_helper.rb
# frozen_string_literal: true module YARD module Templates module Helpers # Helper methods for managing module objects. module ModuleHelper # Prunes the method listing by running the verifier and removing attributes/aliases # @param [Array<CodeObjects::Base>] list a list of methods ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/templates/helpers/text_helper.rb
lib/yard/templates/helpers/text_helper.rb
# frozen_string_literal: true module YARD module Templates module Helpers # Helper methods for text template formats. module TextHelper # @return [String] escapes text def h(text) out = String.new("") text = resolve_links(text) text = text.split(/\n/) ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/templates/helpers/base_helper.rb
lib/yard/templates/helpers/base_helper.rb
# frozen_string_literal: true module YARD::Templates::Helpers # The base helper module included in all templates. module BaseHelper attr_accessor :object, :serializer # @return [CodeObjects::Base] the object representing the current generated # page. Might not be the current {#object} when inside sub...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/templates/helpers/method_helper.rb
lib/yard/templates/helpers/method_helper.rb
# frozen_string_literal: true module YARD module Templates::Helpers # Helper methods for method objects. module MethodHelper # @return [String] formatted arguments for a method def format_args(object) return if object.parameters.nil? params = object.parameters if object.has...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/templates/helpers/uml_helper.rb
lib/yard/templates/helpers/uml_helper.rb
# frozen_string_literal: true module YARD module Templates::Helpers # Helpers for UML template format module UMLHelper # Official UML visibility prefix syntax for an object given its visibility # @param [CodeObjects::Base] object the object to retrieve visibility for # @return [String] the U...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/templates/helpers/filter_helper.rb
lib/yard/templates/helpers/filter_helper.rb
# frozen_string_literal: true module YARD module Templates::Helpers # Helpers for various object types module FilterHelper # @return [Boolean] whether an object is a method def is_method?(object) object.type == :method end # @return [Boolean] whether an object is a namespace ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/templates/helpers/html_helper.rb
lib/yard/templates/helpers/html_helper.rb
# frozen_string_literal: true if RUBY_VERSION < '3.5' require 'cgi/util' else require 'cgi/escape' end module YARD module Templates::Helpers # The helper module for HTML templates. module HtmlHelper include MarkupHelper include HtmlSyntaxHighlightHelper # @private URLMATCH = /[^\...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/templates/helpers/markup/rdoc_markdown.rb
lib/yard/templates/helpers/markup/rdoc_markdown.rb
# frozen_string_literal: true module YARD module Templates module Helpers module Markup begin require 'rdoc'; rescue LoadError; nil end begin require 'rdoc/markdown' rescue LoadError raise NameError, "could not load RDoc Markdown support (rdoc is too old)" ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/templates/helpers/markup/rdoc_markup.rb
lib/yard/templates/helpers/markup/rdoc_markup.rb
# frozen_string_literal: true require 'thread' module YARD module Templates module Helpers module Markup begin require 'rdoc'; rescue LoadError; nil end begin require 'rdoc/markup' require 'rdoc/markup/to_html' class RDocMarkup; MARKUP = RDoc::Markup end ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/rake/yardoc_task.rb
lib/yard/rake/yardoc_task.rb
# frozen_string_literal: true require 'rake' require 'rake/tasklib' module YARD module Rake # The rake task to run {CLI::Yardoc} and generate documentation. class YardocTask < ::Rake::TaskLib # The name of the task # @return [String] the task name attr_accessor :name # Options to pas...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/rubygems/backports.rb
lib/yard/rubygems/backports.rb
# frozen_string_literal: true begin require 'rubygems' if defined?(Gem::VERSION) && Gem::VERSION >= '1.8.0' require File.dirname(__FILE__) + '/backports/gem' require File.dirname(__FILE__) + '/backports/source_index' end rescue LoadError nil # noop end
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/rubygems/specification.rb
lib/yard/rubygems/specification.rb
# frozen_string_literal: true require 'rubygems/specification' class Gem::Specification # @since 0.5.3 def has_yardoc=(value) @has_rdoc = value ? 'yard' : false end def has_yardoc @has_rdoc == 'yard' end undef has_rdoc? def has_rdoc? (@has_rdoc ||= true) && @has_rdoc != 'yard' end alia...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/rubygems/hook.rb
lib/yard/rubygems/hook.rb
# frozen_string_literal: true require 'rubygems' require 'rubygems/user_interaction' require 'fileutils' ## # Gem::YARDoc provides methods to generate YARDoc and yri data for installed gems # upon gem installation. # # This file is automatically required by RubyGems 1.9 and newer. module YARD class RubygemsHook ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/rubygems/doc_manager.rb
lib/yard/rubygems/doc_manager.rb
# frozen_string_literal: true begin require 'rubygems/user_interaction' require 'rubygems/doc_manager' rescue LoadError nil # noop end class Gem::DocManager def self.load_yardoc require File.expand_path(File.join(File.dirname(__FILE__), *%w(.. .. yard))) end def run_yardoc(*args) args << '--quiet'...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/rubygems/backports/source_index.rb
lib/yard/rubygems/backports/source_index.rb
# frozen_string_literal: true #-- # Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. # All rights reserved. # See LICENSE.txt for permissions. #++ require 'rubygems/specification' ## # The SourceIndex object indexes all the gems available from a # particular source (e.g. a list of gem directories, ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/rubygems/backports/gem.rb
lib/yard/rubygems/backports/gem.rb
# frozen_string_literal: true module Gem class << self undef source_index if method_defined?(:source_index) # Returns the Gem::SourceIndex of specifications that are in the Gem.path def source_index @@source_index ||= SourceIndex.from_installed_gems end end end
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/server/doc_server_helper.rb
lib/yard/server/doc_server_helper.rb
# frozen_string_literal: true module YARD module Server # A module that is mixed into {Templates::Template} in order to customize # certain template methods. module DocServerHelper # Modifies {Templates::Helpers::HtmlHelper#url_for} to return a URL instead # of a disk location. # @param ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/server/router.rb
lib/yard/server/router.rb
# frozen_string_literal: true module YARD module Server # A router class implements the logic used to recognize a request for a specific # URL and run specific {Commands::Base commands}. # # == Subclassing Notes # To create a custom router, subclass this class and pass it into the adapter # op...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/server/adapter.rb
lib/yard/server/adapter.rb
# frozen_string_literal: true module YARD module Server # Short circuits a request by raising an error. This exception is caught # by {Commands::Base#call} to immediately end a request and return a response. class FinishRequest < RuntimeError; end # Raises an error if a resource is not found. This ex...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/server/rack_adapter.rb
lib/yard/server/rack_adapter.rb
# frozen_string_literal: true module YARD module Server begin require 'rackup' # @private RackServer = Rackup::Server rescue LoadError require 'rack' # @private RackServer = Rack::Server end # This class wraps the {RackAdapter} into a Rack-compatible middleware. ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/server/library_version.rb
lib/yard/server/library_version.rb
# frozen_string_literal: true require 'fileutils' require 'thread' module YARD module Server # This exception is raised when {LibraryVersion#prepare!} fails, or discovers # that the library is not "prepared" to be served by class LibraryNotPreparedError < RuntimeError; end # A library version encaps...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/server/static_caching.rb
lib/yard/server/static_caching.rb
# frozen_string_literal: true module YARD module Server # Implements static caching for requests. # # @see Router Router documentation for "Caching" module StaticCaching # Called by a router to return the cached object. By default, this # method performs disk-based caching. To perform othe...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/server/webrick_adapter.rb
lib/yard/server/webrick_adapter.rb
# frozen_string_literal: true require 'webrick' module YARD module Server # The main adapter to initialize a WEBrick server. class WebrickAdapter < Adapter # Initializes a WEBrick server. If {Adapter#server_options} contains a # +:daemonize+ key set to true, the server will be daemonized. d...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/server/http_utils.rb
lib/yard/server/http_utils.rb
# frozen_string_literal: false # # httputils.rb -- HTTPUtils Module # # Author: IPR -- Internet Programming with Ruby -- writers # Copyright (c) 2000, 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou # Copyright (c) 2002 Internet Programming with Ruby writers. All rights # reserved. # # $IPR: httputils.rb,v 1.34 2003/06/05 21:34...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/server/doc_server_serializer.rb
lib/yard/server/doc_server_serializer.rb
# frozen_string_literal: true module YARD module Server # A custom {Serializers::Base serializer} which returns resource URLs instead of # static relative paths to files on disk. class DocServerSerializer < Serializers::FileSystemSerializer def initialize(_command = nil) super(:basepath => '...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/server/commands/search_command.rb
lib/yard/server/commands/search_command.rb
# frozen_string_literal: true module YARD module Server module Commands # Performs a search over the objects inside of a library and returns # the results as HTML or plaintext class SearchCommand < LibraryCommand include Templates::Helpers::BaseHelper include Templates::Helpers::...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/server/commands/display_object_command.rb
lib/yard/server/commands/display_object_command.rb
# frozen_string_literal: true module YARD module Server module Commands # Displays documentation for a specific object identified by the path class DisplayObjectCommand < LibraryCommand include DocServerHelper def run if path.empty? if options.readme ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/server/commands/list_command.rb
lib/yard/server/commands/list_command.rb
# frozen_string_literal: true module YARD module Server module Commands # Returns a list of objects of a specific type class ListCommand < LibraryCommand include Templates::Helpers::BaseHelper def run Registry.load_all options.update(:objects => run_verifier(Regist...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/server/commands/display_file_command.rb
lib/yard/server/commands/display_file_command.rb
# frozen_string_literal: true module YARD module Server module Commands # Displays a README or extra file. # # @todo Implement better support for detecting binary (image) filetypes class DisplayFileCommand < LibraryCommand attr_accessor :index def run filename = ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/server/commands/static_file_helpers.rb
lib/yard/server/commands/static_file_helpers.rb
# frozen_string_literal: true module YARD module Server module Commands # Include this module to get access to {#static_template_file?} # and {favicon?} helpers. module StaticFileHelpers include Server::HTTPUtils # Serves an empty favicon. # @raise [FinishRequest] final...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/server/commands/static_file_command.rb
lib/yard/server/commands/static_file_command.rb
# frozen_string_literal: true module YARD module Server module Commands # Serves static content when no other router matches a request class StaticFileCommand < LibraryCommand include StaticFileHelpers DefaultMimeTypes['js'] = 'text/javascript' # Defines the paths used to sea...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/server/commands/library_command.rb
lib/yard/server/commands/library_command.rb
# frozen_string_literal: true require 'thread' module YARD module Server module Commands class LibraryOptions < CLI::YardocOptions def adapter; @command.adapter end def library; @command.library end def single_library; @command.single_library end def serializer; @command.ser...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/server/commands/library_index_command.rb
lib/yard/server/commands/library_index_command.rb
# frozen_string_literal: true module YARD module Server module Commands class LibraryIndexOptions < CLI::YardocOptions attr_accessor :adapter, :libraries default_attr :template, :doc_server default_attr :type, :library_list default_attr :serialize, false end # Re...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/server/commands/root_request_command.rb
lib/yard/server/commands/root_request_command.rb
# frozen_string_literal: true module YARD module Server module Commands # Serves requests from the root of the server class RootRequestCommand < Base include StaticFileHelpers def run static_template_file? || favicon? || not_found end end end end end
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/server/commands/frames_command.rb
lib/yard/server/commands/frames_command.rb
# frozen_string_literal: true module YARD module Server module Commands # Displays an object wrapped in frames class FramesCommand < DisplayObjectCommand def run options.update(:frames => true, :type => :fulldoc) tpl = fulldoc_template tpl.generate_frameset ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/server/commands/base.rb
lib/yard/server/commands/base.rb
# frozen_string_literal: true require 'fileutils' module YARD module Server module Commands # This is the base command class used to implement custom commands for # a server. A command will be routed to by the {Router} class and return # a Rack-style response. # # == Attribute Initi...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/server/templates/default/method_details/html/setup.rb
lib/yard/server/templates/default/method_details/html/setup.rb
# frozen_string_literal: true def init super sections.place(:permalink).after_any(:method_signature) end
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/server/templates/default/layout/html/setup.rb
lib/yard/server/templates/default/layout/html/setup.rb
# frozen_string_literal: true def javascripts super + %w(js/autocomplete.js) end def stylesheets super + %w(css/custom.css) end
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/server/templates/doc_server/library_list/html/setup.rb
lib/yard/server/templates/doc_server/library_list/html/setup.rb
# frozen_string_literal: true include T('default/layout/html') def init sections :library_list, [:title, :listing, :footer] end
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/server/templates/doc_server/processing/html/setup.rb
lib/yard/server/templates/doc_server/processing/html/setup.rb
# frozen_string_literal: true def init sections :processing end
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/server/templates/doc_server/search/html/setup.rb
lib/yard/server/templates/doc_server/search/html/setup.rb
# frozen_string_literal: true def init sections :search, [T('../default/layout')] end def search options.breadcrumb_title = h("Search for '#{@query}'") yieldall :contents => erb(:search) end
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/cli/command.rb
lib/yard/cli/command.rb
# frozen_string_literal: true require 'optparse' module YARD module CLI # Abstract base class for CLI utilities. Provides some helper methods for # the option parser # # @abstract # @since 0.6.0 class Command # Helper method to run the utility on an instance. # @see #run def...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/cli/gems.rb
lib/yard/cli/gems.rb
# frozen_string_literal: true module YARD module CLI # @since 0.6.0 class Gems < Command def initialize @rebuild = false @gems = [] end def description; "Builds YARD index for gems" end # Runs the commandline utility, parsing arguments and generating # YARD inde...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/cli/yardopts_command.rb
lib/yard/cli/yardopts_command.rb
# frozen_string_literal: true require 'optparse' module YARD module CLI # Abstract base class for command that reads .yardopts file # # @abstract # @since 0.8.3 class YardoptsCommand < Command # The configuration filename to load extra options from DEFAULT_YARDOPTS_FILE = ".yardopts" ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/cli/diff.rb
lib/yard/cli/diff.rb
# frozen_string_literal: true require 'tmpdir' require 'fileutils' require 'open-uri' module YARD module CLI # CLI command to return the objects that were added/removed from 2 versions # of a project (library, gem, working copy). # @since 0.6.0 class Diff < Command def initialize super ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/cli/yardoc.rb
lib/yard/cli/yardoc.rb
# frozen_string_literal: true require 'digest/sha1' require 'fileutils' module YARD module CLI # Default options used in +yard doc+ command. class YardocOptions < Templates::TemplateOptions # @return [Array<CodeObjects::ExtraFileObject>] # the list of extra files rendered along with objects ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/cli/graph.rb
lib/yard/cli/graph.rb
# frozen_string_literal: true module YARD module CLI # Options to pass to the {Graph} CLI. class GraphOptions < Templates::TemplateOptions # @return [:dot] the default output format default_attr :format, :dot # @return [Boolean] whether to list the full class diagram attr_accessor :fu...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/cli/stats.rb
lib/yard/cli/stats.rb
# frozen_string_literal: true module YARD module CLI # @since 0.6.0 class Stats < Yardoc include Templates::Helpers::BaseHelper # Maintains the order in which +stats_for_+ statistics methods should be # printed. # # @see #print_statistics STATS_ORDER = [:files, :modules, :...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/cli/display.rb
lib/yard/cli/display.rb
# frozen_string_literal: true module YARD module CLI # Display one object # @since 0.8.6 class Display < Yardoc def description; 'Displays a formatted object' end def initialize(*args) super options.format = :text # default for this command @layout = nil @objec...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/cli/help.rb
lib/yard/cli/help.rb
# frozen_string_literal: true module YARD module CLI # Handles help for commands # @since 0.6.0 class Help < Command def description; "Retrieves help for a command" end def run(*args) cmd = args.first && CommandParser.commands[args.first.to_sym] if cmd cmd.run('--hel...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/cli/yri.rb
lib/yard/cli/yri.rb
# frozen_string_literal: true require 'rbconfig' module YARD module CLI # A tool to view documentation in the console like `ri` class YRI < Command # The location in {YARD::CONFIG_DIR} where the YRI cache file is loaded # from. CACHE_FILE = File.expand_path(File.join(YARD::Config::CONFIG_DI...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/cli/i18n.rb
lib/yard/cli/i18n.rb
# frozen_string_literal: true require "pathname" module YARD module CLI # CLI command to support internationalization (a.k.a. i18n). # I18n feature is based on gettext technology. # This command generates .pot file from docstring and extra # documentation. # # @since 0.8.0 # @todo Support...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/cli/markup_types.rb
lib/yard/cli/markup_types.rb
# frozen_string_literal: true module YARD module CLI # Lists all markup types # @since 0.8.6 class MarkupTypes < Command def description; 'Lists all available markup types and libraries' end # Runs the commandline utility, parsing arguments and displaying a # list of markup types ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/cli/list.rb
lib/yard/cli/list.rb
# frozen_string_literal: true module YARD module CLI # Lists all constant and method names in the codebase. Uses {Yardoc} --list. class List < Command def description; 'Lists all constant and methods. Uses `yard doc --list`' end # Runs the commandline utility, parsing arguments and displaying a ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/cli/config.rb
lib/yard/cli/config.rb
# frozen_string_literal: true module YARD module CLI # CLI command to view or edit configuration options # @since 0.6.2 class Config < Command # @return [Symbol, nil] the key to view/edit, if any attr_accessor :key # @return [Array, nil] the list of values to set (or single value), if m...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/cli/server.rb
lib/yard/cli/server.rb
# frozen_string_literal: true module YARD module CLI # A local documentation server # @since 0.6.0 class Server < Command # @return [Hash] a list of options to pass to the doc server attr_accessor :options # @return [Hash] a list of options to pass to the web server attr_accessor...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/cli/command_parser.rb
lib/yard/cli/command_parser.rb
# frozen_string_literal: true module YARD module CLI # This class parses a command name out of the +yard+ CLI command and calls # that command in the form: # # $ yard command_name [options] # # If no command or arguments are specified, or if the arguments immediately # begin with a +--op...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/parser/base.rb
lib/yard/parser/base.rb
# frozen_string_literal: true module YARD module Parser # Represents the abstract base parser class that parses source code in # a specific way. A parser should implement {#parse}, {#tokenize} and # {#enumerator}. # # == Registering a Custom Parser # To register a parser, see {SourceParser.reg...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/parser/source_parser.rb
lib/yard/parser/source_parser.rb
# frozen_string_literal: true require 'stringio' module YARD module Parser # Raised when an object is recognized but cannot be documented. This # generally occurs when the Ruby syntax used to declare an object is # too dynamic in nature. class UndocumentableError < RuntimeError; end # Raised whe...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/parser/c/statement.rb
lib/yard/parser/c/statement.rb
# frozen_string_literal: true module YARD module Parser module C class Statement attr_accessor :source attr_accessor :line attr_accessor :file # @deprecated Groups are now defined by directives # @see Tags::GroupDirective attr_accessor :group attr_ac...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false