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/templates/default/class/html/setup.rb
templates/default/class/html/setup.rb
# frozen_string_literal: true include T('default/module/html')
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/templates/default/class/text/setup.rb
templates/default/class/text/setup.rb
# frozen_string_literal: true include T('default/module/text') def init super sections.place(:subclasses).before(:children) sections.delete(:children) end def format_object_title(object) "Class: #{object.title} < #{object.superclass.title}" end
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/templates/default/module/setup.rb
templates/default/module/setup.rb
# frozen_string_literal: true include Helpers::ModuleHelper def init sections :header, :box_info, :pre_docstring, T('docstring'), :children, :constant_summary, [T('docstring')], :inherited_constants, :attribute_summary, [:item_summary], :inherited_attributes, :method_summary, [:item_summary], :inherited_...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/templates/default/module/dot/setup.rb
templates/default/module/dot/setup.rb
# frozen_string_literal: true def init @modules = object.children.select {|o| o.type == :module } @classes = object.children.select {|o| o.type == :class } sections :child, [:info], :classes, [T('class')], :header, [T('module')], :dependencies end def dependencies return unless options.dependencies erb(:depe...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/templates/default/module/text/setup.rb
templates/default/module/text/setup.rb
# frozen_string_literal: true def init sections :header, [T('docstring')], :children, :includes, :extends, :class_meths_list, :instance_meths_list end def class_meths @classmeths ||= method_listing.select {|o| o.scope == :class } end def instance_meths @instmeths ||= method_listing.select {|o| o.scope == :i...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/templates/default/onefile/html/setup.rb
templates/default/onefile/html/setup.rb
# frozen_string_literal: true include T('default/layout/html') include YARD::Parser::Ruby::Legacy def init override_serializer @object = YARD::Registry.root @files.shift @objects.delete(YARD::Registry.root) @objects.unshift(YARD::Registry.root) sections :layout, [:readme, :files, :all_objects] end def all...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/templates/guide/fulldoc/html/setup.rb
templates/guide/fulldoc/html/setup.rb
# frozen_string_literal: true include T('default/fulldoc/html') module OverrideFileLinks def resolve_links(text) result = '' log.enter_level(Logger::ERROR) { result = super } result end def url_for(object, *args) if CodeObjects::ExtraFileObject === object && object == options.readme 'index...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/templates/guide/tags/html/setup.rb
templates/guide/tags/html/setup.rb
# frozen_string_literal: true include T('default/tags/html') def init super [:since, :see, :return].each do |section| sections[:index].delete(section) end end
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/templates/guide/method/html/setup.rb
templates/guide/method/html/setup.rb
# frozen_string_literal: true def init sections :header, [T('docstring')] end def format_args(object) return if object.parameters.nil? params = object.parameters if object.has_tag?(:yield) || object.has_tag?(:yieldparam) params.reject! do |param| param[0].to_s[0, 1] == "&" && !object.tags(:pa...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/templates/guide/layout/html/setup.rb
templates/guide/layout/html/setup.rb
# frozen_string_literal: true include T('default/layout/html') def init super @topfile = options.readme if options.files if @topfile @toptitle = @topfile.attributes[:title] || "Documentation Overview" end @page_title = @file == options.readme ? options.title : @file.title index = options....
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/templates/guide/docstring/html/setup.rb
templates/guide/docstring/html/setup.rb
# frozen_string_literal: true include T('default/docstring/html')
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/templates/guide/class/html/setup.rb
templates/guide/class/html/setup.rb
# frozen_string_literal: true include T('guide/module/html')
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/templates/guide/module/html/setup.rb
templates/guide/module/html/setup.rb
# frozen_string_literal: true include Helpers::ModuleHelper def init sections :header, [T('docstring')], :method_list, [T('method')] end def method_list @meths = object.meths(:inherited => false, :included => false) cons = @meths.find(&:constructor?) @meths = @meths.reject {|meth| special_method?(meth) } @m...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/templates/guide/onefile/html/setup.rb
templates/guide/onefile/html/setup.rb
# frozen_string_literal: true include T('default/onefile/html') def init sections :layout, [:toc, :files] end
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard.rb
lib/yard.rb
# frozen_string_literal: true module YARD # The root path for YARD source libraries ROOT = File.expand_path(File.dirname(__FILE__)) require File.join(YARD::ROOT, 'yard', 'version') require File.join(YARD::ROOT, 'yard', 'autoload') # The root path for YARD builtin templates TEMPLATE_ROOT = File.join(ROOT, ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/rubygems_plugin.rb
lib/rubygems_plugin.rb
# frozen_string_literal: true if defined?(Gem::VERSION) && Gem::VERSION >= "2.0." require File.expand_path(File.dirname(__FILE__) + '/yard/rubygems/hook') else unless defined?(Gem::DocManager.load_yardoc) require File.expand_path(File.dirname(__FILE__) + '/yard/rubygems/specification') require File.expand_p...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/registry_store.rb
lib/yard/registry_store.rb
# frozen_string_literal: true require 'fileutils' module YARD # The data store for the {Registry}. # # @see Registry # @see Serializers::YardocSerializer class RegistryStore # @deprecated The registry no longer tracks proxy types attr_reader :proxy_types attr_reader :file, :checksums def ini...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/version.rb
lib/yard/version.rb
# frozen_string_literal: true module YARD VERSION = '0.9.38' end
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/autoload.rb
lib/yard/autoload.rb
# frozen_string_literal: true # @private def __p(path) File.join(YARD::ROOT, 'yard', *path.split('/')); end module YARD module CLI # Namespace for command-line interface components autoload :Command, __p('cli/command') autoload :CommandParser, __p('cli/command_parser') autoload :Config, ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/globals.rb
lib/yard/globals.rb
# frozen_string_literal: true # @group Global Convenience Methods # Shortcut for creating a YARD::CodeObjects::Proxy via a path # # @see YARD::CodeObjects::Proxy # @see YARD::Registry.resolve def P(namespace, name = nil, type = nil) # rubocop:disable Naming/MethodName if name.nil? name = namespace namespace ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/verifier.rb
lib/yard/verifier.rb
# frozen_string_literal: true module YARD # Similar to a Proc, but runs a set of Ruby expressions using a small # DSL to make tag lookups easier. # # The syntax is as follows: # * All syntax is Ruby compatible # * +object+ (+o+ for short) exist to access the object being verified # * +@TAGNAME+ is transla...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/options.rb
lib/yard/options.rb
# frozen_string_literal: true module YARD # Generalized options class for passing around large amounts of options between objects. # # The options class exists for better visibility and documentability of options being # passed through to other objects. Because YARD has parser and template architectures # tha...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/logging.rb
lib/yard/logging.rb
# encoding: utf-8 # frozen_string_literal: true require 'thread' module YARD # Handles console logging for info, warnings and errors. # Uses the stdlib Logger class in Ruby for all the backend logic. class Logger # Log severity levels module Severity # Debugging log level DEBUG = 0 # I...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/registry.rb
lib/yard/registry.rb
# frozen_string_literal: true require 'fileutils' require 'digest/sha1' module YARD # The +Registry+ is the centralized data store for all {CodeObjects} created # during parsing. The storage is a key value store with the object's path # (see {CodeObjects::Base#path}) as the key and the object itself as the value...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/docstring.rb
lib/yard/docstring.rb
# frozen_string_literal: true module YARD # A documentation string, or "docstring" for short, encapsulates the # comments and metadata, or "tags", of an object. Meta-data is expressed # in the form +@tag VALUE+, where VALUE can span over multiple lines as # long as they are indented. The following +@example+ ta...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/registry_resolver.rb
lib/yard/registry_resolver.rb
# frozen_string_literal: true module YARD # Handles all logic for complex lexical and inherited object resolution. # Used by {Registry.resolve}, so there is no need to use this class # directly. # # @see Registry.resolve # @since 0.9.1 class RegistryResolver include CodeObjects::NamespaceMapper #...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/docstring_parser.rb
lib/yard/docstring_parser.rb
# frozen_string_literal: true module YARD # Parses text and creates a {Docstring} object to represent documentation # for a {CodeObjects::Base}. To create a new docstring, you should initialize # the parser and call {#parse} followed by {#to_docstring}. # # == Subclassing Notes # # The DocstringParser ca...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/gem_index.rb
lib/yard/gem_index.rb
# frozen_string_literal: true # Backward compatibility for gem specification lookup # @see Gem::SourceIndex module YARD module GemIndex module_function def find_all_by_name(*args) if defined?(Gem::Specification) && Gem::Specification.respond_to?(:find_all_by_name) Gem::Specification.find_all_b...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/config.rb
lib/yard/config.rb
# frozen_string_literal: true module YARD # This class maintains all system-wide configuration for YARD and handles # the loading of plugins. To access options call {options}, and to load # a plugin use {load_plugin}. All other public methods are used by YARD # during load time. # # == User Configuration Fi...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/server.rb
lib/yard/server.rb
# frozen_string_literal: true module YARD module Server # Registers a static path to be used in static asset lookup. # @param [String] path the pathname to register # @return [void] # @since 0.6.2 def self.register_static_path(path) static_paths = Commands::StaticFileCommand::STATIC_PATHS ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/open_struct.rb
lib/yard/open_struct.rb
module YARD # An OpenStruct compatible struct class that allows for basic access of attributes # via +struct.attr_name+ and +struct.attr_name = value+. class OpenStruct def initialize(hash = {}) @table = hash.each_pair { |k, v| [k.to_sym, v] } end # @private def method_missing(name, *args) ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/serializers/process_serializer.rb
lib/yard/serializers/process_serializer.rb
# frozen_string_literal: true module YARD module Serializers # Serializes an object to a process (like less) # # @example Serializing to a pager (less) # serializer = ProcessSerializer.new('less') # serializer.serialize(object, "data!") class ProcessSerializer < Base # Creates a new ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/serializers/base.rb
lib/yard/serializers/base.rb
# frozen_string_literal: true module YARD module Serializers # The abstract base serializer. Serializers allow templates to be # rendered to various endpoints. For instance, a {FileSystemSerializer} # would allow template contents to be written to the filesystem # # To implement a custom serialize...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/serializers/file_system_serializer.rb
lib/yard/serializers/file_system_serializer.rb
# frozen_string_literal: true module YARD module Serializers # Implements a serializer that reads from and writes to the filesystem. class FileSystemSerializer < Base # The base path to write data to. # @return [String] a base path attr_reader :basepath def basepath=(value) @b...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/serializers/yardoc_serializer.rb
lib/yard/serializers/yardoc_serializer.rb
# frozen_string_literal: true module YARD # Stubs marshal dumps and acts a delegate class for an object by path # # @private class StubProxy instance_methods.each {|m| undef_method(m) unless m.to_s =~ /^__|^object_id$/ } def _dump(_depth) @path end def self._load(str) new(str) end def hash; @pa...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/serializers/stdout_serializer.rb
lib/yard/serializers/stdout_serializer.rb
# frozen_string_literal: true module YARD module Serializers # A serializer that writes data to standard output. class StdoutSerializer < Base # Creates a serializer to print text to stdout # # @param [Fixnum, nil] wrap if wrap is a number, wraps text to +wrap+ # columns, otherwise n...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/code_objects/class_variable_object.rb
lib/yard/code_objects/class_variable_object.rb
# frozen_string_literal: true module YARD::CodeObjects register_separator NSEP, :class_variable # Represents a class variable inside a namespace. The path is expressed # in the form "A::B::@@classvariable" class ClassVariableObject < Base # @return [String] the class variable's value attr_accessor :val...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/code_objects/extra_file_object.rb
lib/yard/code_objects/extra_file_object.rb
# frozen_string_literal: true module YARD::CodeObjects # An ExtraFileObject represents an extra documentation file (README or other # file). It is not strictly a CodeObject (does not inherit from `Base`) although # it implements `path`, `name` and `type`, and therefore should be structurally # compatible with m...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/code_objects/namespace_mapper.rb
lib/yard/code_objects/namespace_mapper.rb
# frozen_string_literal: true module YARD module CodeObjects # This module controls registration and accessing of namespace separators # for {Registry} lookup. # # @since 0.9.1 module NamespaceMapper # @!group Registering a Separator for a Namespace # Registers a separator with an opt...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/code_objects/extended_method_object.rb
lib/yard/code_objects/extended_method_object.rb
# frozen_string_literal: true module YARD::CodeObjects # Represents an instance method of a module that was mixed into the class # scope of another namespace. # # @see MethodObject class ExtendedMethodObject instance_methods.each {|m| undef_method(m) unless m =~ /^__/ || m.to_sym == :object_id } # @r...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/code_objects/constant_object.rb
lib/yard/code_objects/constant_object.rb
# frozen_string_literal: true module YARD::CodeObjects register_separator NSEP, :constant # A +ConstantObject+ represents a Ruby constant (not a module or class). # To access the constant's (source code) value, use {#value}. class ConstantObject < Base # The source code representing the constant's value ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/code_objects/module_object.rb
lib/yard/code_objects/module_object.rb
# frozen_string_literal: true module YARD::CodeObjects register_separator NSEP, :module # Represents a Ruby module. class ModuleObject < NamespaceObject # Returns the inheritance tree of mixins. # # @param [Boolean] include_mods if true, will include mixed in # modules (which is likely what is ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/code_objects/proxy.rb
lib/yard/code_objects/proxy.rb
# frozen_string_literal: true module YARD module CodeObjects # A special type of +NoMethodError+ when raised from a {Proxy} class ProxyMethodError < NoMethodError; end # @private PROXY_MATCH = /(?:#{NSEPQ}|#{ISEPQ}|#{CSEPQ})([^#{Regexp.quote( (NSEP + ISEP + CSEP).split('').uniq.join )}]+)$/...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/code_objects/macro_object.rb
lib/yard/code_objects/macro_object.rb
# frozen_string_literal: true module YARD module CodeObjects # A MacroObject represents a docstring defined through +@!macro NAME+ and can be # reused by specifying the tag +@!macro NAME+. You can also provide the # +attached+ type flag to the macro definition to have it attached to the # specific DS...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/code_objects/base.rb
lib/yard/code_objects/base.rb
# frozen_string_literal: true module YARD module CodeObjects # A list of code objects. This array acts like a set (no unique items) # but also disallows any {Proxy} objects from being added. class CodeObjectList < Array # Creates a new object list associated with a namespace # # @param [...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/code_objects/class_object.rb
lib/yard/code_objects/class_object.rb
# frozen_string_literal: true module YARD::CodeObjects register_separator NSEP, :class # A ClassObject represents a Ruby class in source code. It is a {ModuleObject} # with extra inheritance semantics through the superclass. class ClassObject < NamespaceObject # The {ClassObject} that this class object inh...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/code_objects/root_object.rb
lib/yard/code_objects/root_object.rb
# frozen_string_literal: true module YARD module CodeObjects # Represents the root namespace object (the invisible Ruby module that # holds all top level modules, class and other objects). class RootObject < ModuleObject def path; @path ||= "" end def inspect; @inspect ||= "#<yardoc root>" end...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/code_objects/method_object.rb
lib/yard/code_objects/method_object.rb
# frozen_string_literal: true module YARD::CodeObjects register_separator CSEP, :method register_separator ISEP, :method # Represents a Ruby method in source class MethodObject < Base # The scope of the method (+:class+ or +:instance+) # # @return [Symbol] the scope attr_reader :scope # Wh...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/code_objects/namespace_object.rb
lib/yard/code_objects/namespace_object.rb
# frozen_string_literal: true module YARD::CodeObjects register_separator NSEP, :namespace default_separator NSEP # A "namespace" is any object that can store other objects within itself. # The two main Ruby objects that can act as namespaces are modules # ({ModuleObject}) and classes ({ClassObject}). clas...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/tags/tag.rb
lib/yard/tags/tag.rb
# frozen_string_literal: true module YARD module Tags # Represents a metadata tag value (+@tag+). Tags can have any combination of # {#types}, {#name} and {#text}, or none of the above. # # @example Programmatic tag creation # # The following docstring syntax: # # @param [String, nil] ar...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/tags/ref_tag_list.rb
lib/yard/tags/ref_tag_list.rb
# frozen_string_literal: true module YARD module Tags class RefTagList attr_accessor :owner, :tag_name, :name def initialize(tag_name, owner, name = nil) @owner = CodeObjects::Proxy === owner ? owner : P(owner) @tag_name = tag_name.to_s @name = name end def tags ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/tags/types_explainer.rb
lib/yard/tags/types_explainer.rb
# frozen_string_literal: true require 'strscan' module YARD module Tags class TypesExplainer # (see Tag#explain_types) # @param types [Array<String>] a list of types to parse and summarize def self.explain(*types) explain!(*types) rescue SyntaxError nil end # ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/tags/default_tag.rb
lib/yard/tags/default_tag.rb
# frozen_string_literal: true module YARD module Tags class DefaultTag < Tag attr_reader :defaults def initialize(tag_name, text, types = nil, name = nil, defaults = nil) super(tag_name, text, types, name) @defaults = defaults 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/tags/overload_tag.rb
lib/yard/tags/overload_tag.rb
# frozen_string_literal: true module YARD module Tags class OverloadTag < Tag attr_reader :signature, :parameters, :docstring def initialize(tag_name, text) super(tag_name, nil) parse_tag(text) parse_signature end def tag(name) docstring.tag(name) end def ta...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/tags/library.rb
lib/yard/tags/library.rb
# frozen_string_literal: true module YARD module Tags # Keeps track of all the registered meta-data tags and directives. # Also allows for defining of custom tags and customizing the tag parsing # syntax. # # == Defining Custom Meta-Data Tags # # To define a custom tag, use {define_tag}. Y...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/tags/directives.rb
lib/yard/tags/directives.rb
# frozen_string_literal: true module YARD module Tags # The base directive class. Subclass this class to create a custom # directive, registering it with {Library.define_directive}. Directive # classes are executed via the {#call} method, which perform all directive # processing on the object. # ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/tags/tag_format_error.rb
lib/yard/tags/tag_format_error.rb
# frozen_string_literal: true module YARD module Tags class TagFormatError < RuntimeError end end end
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/tags/option_tag.rb
lib/yard/tags/option_tag.rb
# frozen_string_literal: true module YARD module Tags class OptionTag < Tag attr_accessor :pair def initialize(tag_name, name, pair) super(tag_name, nil, nil, name) @pair = pair 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/tags/ref_tag.rb
lib/yard/tags/ref_tag.rb
# frozen_string_literal: true module YARD module Tags module RefTag attr_accessor :owner end end end
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/tags/default_factory.rb
lib/yard/tags/default_factory.rb
# frozen_string_literal: true module YARD module Tags class DefaultFactory TYPELIST_OPENING_CHARS = '[({<' TYPELIST_CLOSING_CHARS = '>})]' # Parses tag text and creates a new tag with descriptive text # # @param tag_name the name of the tag to parse # @param [String] te...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/core_ext/insertion.rb
lib/yard/core_ext/insertion.rb
# frozen_string_literal: true # The Insertion class inserts a value before or after another # value in a list. # # @example # Insertion.new([1, 2, 3], 4).before(3) # => [1, 2, 4, 3] class Insertion # Creates an insertion object on a list with a value to be # inserted. To finalize the insertion, call {#before} or ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/core_ext/array.rb
lib/yard/core_ext/array.rb
# frozen_string_literal: true class Array # Places values before or after another object (by value) in # an array. This is used in tandem with the before and after # methods of the {Insertion} class. # # @example Places an item before another # [1, 2, 3].place(4).before(3) # => [1, 2, 4, 3] # @example P...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/core_ext/file.rb
lib/yard/core_ext/file.rb
# frozen_string_literal: true require 'fileutils' class File RELATIVE_PARENTDIR = '..' RELATIVE_SAMEDIR = '.' # @group Manipulating Paths # Turns a path +to+ into a relative path from starting # point +from+. The argument +from+ is assumed to be # a filename. To treat it as a directory, make sure it # ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/core_ext/string.rb
lib/yard/core_ext/string.rb
# frozen_string_literal: true class String # Splits text into tokens the way a shell would, handling quoted # text as a single token. Use '\"' and "\'" to escape quotes and # '\\' to escape a backslash. # # @return [Array] an array representing the tokens def shell_split out = [String.new("")] state...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/core_ext/symbol_hash.rb
lib/yard/core_ext/symbol_hash.rb
# frozen_string_literal: true # A subclass of Hash where all keys are converted into Symbols, and # optionally, all String values are converted into Symbols. class SymbolHash < Hash # Creates a new SymbolHash object # # @param [Boolean] symbolize_value converts any String values into Symbols # if this is set ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/core_ext/module.rb
lib/yard/core_ext/module.rb
# frozen_string_literal: true class Module # Returns the class name of a full module namespace path # # @example # module A::B::C; class_name end # => "C" # @return [String] the last part of a module path def class_name name.split("::").last end end
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/core_ext/hash.rb
lib/yard/core_ext/hash.rb
# frozen_string_literal: true class Hash class << self def create(*args) if args.first.is_a?(Array) && args.size == 1 obj = new args.first.each {|k, v| obj[k] = v } obj else create_186(*args) end end alias create_186 [] alias [] create end end if RUB...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/i18n/pot_generator.rb
lib/yard/i18n/pot_generator.rb
# frozen_string_literal: true require "stringio" module YARD module I18n # The +PotGenerator+ generates POT format string from # {CodeObjects::Base} and {CodeObjects::ExtraFileObject}. # # == POT and PO # # POT is an acronym for "Portable Object Template". POT is a # template file to crea...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/i18n/text.rb
lib/yard/i18n/text.rb
# frozen_string_literal: true module YARD module I18n # Provides some convenient features for translating a text. class Text # Creates a text object that has translation related features for # the input text. # # @param [#each_line] input a text to be translated. # @option option...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/i18n/message.rb
lib/yard/i18n/message.rb
# frozen_string_literal: true require "set" module YARD module I18n # +Message+ is a translation target message. It has message ID as # {#id} and some properties {#locations} and {#comments}. # # @since 0.8.1 class Message # @return [String] the message ID of the translation target message....
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/i18n/locale.rb
lib/yard/i18n/locale.rb
# frozen_string_literal: true module YARD module I18n # +Locale+ is a unit of translation. It has {#name} and a set of # messages. # # @since 0.8.2 class Locale class << self # @return [String, nil] the default locale name. # @since 0.8.4 attr_accessor :default ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/i18n/messages.rb
lib/yard/i18n/messages.rb
# frozen_string_literal: true module YARD module I18n # Acts as a container for {Message} objects. # # @since 0.8.1 class Messages include Enumerable # Creates a new container. def initialize @messages = {} end # Enumerates each {Message} in the container. ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/i18n/po_parser.rb
lib/yard/i18n/po_parser.rb
# frozen_string_literal: true module YARD module I18n # +Locale+ is a wrapper for gettext's PO parsing feature. It hides # gettext API difference from YARD. # # @since 0.8.8 class POParser if RUBY_VERSION < "1.9" begin require "gettext/tools/poparser" require "get...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/processor.rb
lib/yard/handlers/processor.rb
# frozen_string_literal: true module YARD module Handlers # Iterates over all statements in a file and delegates them to the # {Handlers::Base} objects that are registered to handle the statement. # # This class is passed to each handler and keeps overall processing state. # For example, if the {...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/base.rb
lib/yard/handlers/base.rb
# frozen_string_literal: true module YARD module Handlers # Raise this error when a handler should exit before completing. # The exception will be silenced, allowing the next handler(s) in the # queue to be executed. # @since 0.8.4 class HandlerAborted < ::RuntimeError; end # Raised during pr...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/common/method_handler.rb
lib/yard/handlers/common/method_handler.rb
# frozen_string_literal: true module YARD::Handlers module Common # Shared functionality between Ruby and C method handlers. module MethodHandler # @param [MethodObject] obj def add_predicate_return_tag(obj) if obj.tag(:return) && (obj.tag(:return).types || []).empty? obj.tag(:r...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/c/symbol_handler.rb
lib/yard/handlers/c/symbol_handler.rb
# frozen_string_literal: true # Keeps track of function bodies for symbol lookup during Ruby method declarations class YARD::Handlers::C::SymbolHandler < YARD::Handlers::C::Base MATCH = /\A\s*(?:(?:\w+)\s+)?(?:intern\s+)?VALUE\s+(\w+)\s*\(/ handles MATCH statement_class ToplevelStatement process { symbols[state...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/c/constant_handler.rb
lib/yard/handlers/c/constant_handler.rb
# frozen_string_literal: true class YARD::Handlers::C::ConstantHandler < YARD::Handlers::C::Base MATCH = /\brb_define_((?:readonly_)?variable|(?:global_)?const) \s*\((?:\s*(\w+),)?\s*"(\w+)",\s*(.*?)\s*\)\s*;/xm handles MATCH statement_class BodyStatement process do statement.source.scan(MA...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/c/module_handler.rb
lib/yard/handlers/c/module_handler.rb
# frozen_string_literal: true class YARD::Handlers::C::ModuleHandler < YARD::Handlers::C::Base MATCH1 = /([\w\.]+)\s* = \s*rb_define_module\s*\(\s*"([\w:]+)"\s*\)/mx MATCH2 = /([\w\.]+)\s* = \s*rb_define_module_under\s*\(\s*(\w+),\s*"(\w+)"\s*\)/mx handles MATCH1 handles MATCH2 statement_class BodyStatement ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/c/path_handler.rb
lib/yard/handlers/c/path_handler.rb
# frozen_string_literal: true class YARD::Handlers::C::PathHandler < YARD::Handlers::C::Base MATCH = /([\w\.]+)\s* = \s*rb_path2class\s*\(\s*"([\w:]+)"\)/mx handles MATCH process do statement.source.scan(MATCH) do |var_name, path| namespaces[var_name] = P(path) end end end
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/c/method_handler.rb
lib/yard/handlers/c/method_handler.rb
# frozen_string_literal: true class YARD::Handlers::C::MethodHandler < YARD::Handlers::C::Base MATCH1 = /rb_define_ ( singleton_method | method | module_function | private_method ) ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/c/mixin_handler.rb
lib/yard/handlers/c/mixin_handler.rb
# frozen_string_literal: true class YARD::Handlers::C::MixinHandler < YARD::Handlers::C::Base MATCH = /rb_include_module\s*\(\s*(\w+?),\s*(\w+?)\s*\)/ handles MATCH statement_class BodyStatement process do statement.source.scan(MATCH) do |klass_var, mixin_var| namespace = namespace_for_variable(klass...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/c/alias_handler.rb
lib/yard/handlers/c/alias_handler.rb
# frozen_string_literal: true class YARD::Handlers::C::AliasHandler < YARD::Handlers::C::Base MATCH = /rb_define_alias \s*\(\s*([\w\.]+), \s*"([^"]+)", \s*"([^"]+)"\s*\)/xm handles MATCH statement_class BodyStatement process do statement.source.scan(MATCH) do |var_nam...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/c/base.rb
lib/yard/handlers/c/base.rb
# frozen_string_literal: true module YARD module Handlers module C class Base < Handlers::Base include YARD::Parser::C include HandlerMethods # @return [Boolean] whether the handler handles this statement def self.handles?(statement, processor) processor.globals.cr...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/c/override_comment_handler.rb
lib/yard/handlers/c/override_comment_handler.rb
# frozen_string_literal: true # Parses comments class YARD::Handlers::C::OverrideCommentHandler < YARD::Handlers::C::Base handles(/./) statement_class Comment process do return if statement.overrides.empty? statement.overrides.each do |type, name| override_comments << [name, statement] obj = ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/c/class_handler.rb
lib/yard/handlers/c/class_handler.rb
# frozen_string_literal: true class YARD::Handlers::C::ClassHandler < YARD::Handlers::C::Base MATCH1 = /([\w\.]+)\s* = \s*(?:rb_define_class|boot_defclass)\s* \( \s*"([\w:]+)", \s*(\w+|0)\s* \)/mx MATCH2 = /([\w\.]+)\s* = \s*rb_define_class_under\s* ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/c/init_handler.rb
lib/yard/handlers/c/init_handler.rb
# frozen_string_literal: true # Handles the Init_Libname() method class YARD::Handlers::C::InitHandler < YARD::Handlers::C::Base MATCH = /\A\s*(?:\S+\s+)*void\s+(?:[Ii]nit_)?(\w+)\s*/ handles MATCH statement_class ToplevelStatement process do parse_block decl = statement.declaration[MATCH, 1] if de...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/c/attribute_handler.rb
lib/yard/handlers/c/attribute_handler.rb
# frozen_string_literal: true class YARD::Handlers::C::AttributeHandler < YARD::Handlers::C::Base MATCH = /rb_define_attr\s*\(\s*([\w\.]+),\s*"([^"]+)",\s*(0|1)\s*,\s*(0|1)\s*\)/ handles MATCH process do return if ToplevelStatement == statement return if Comment === statement && statement.type != :multi ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/c/struct_handler.rb
lib/yard/handlers/c/struct_handler.rb
# frozen_string_literal: true class YARD::Handlers::C::StructHandler < YARD::Handlers::C::Base MATCH = /([\w\.]+)\s*=\s*(?:rb_struct_define_without_accessor)\s* \(\s*"([\w:]+)"\s*,\s*(\w+)\s*/mx handles MATCH statement_class BodyStatement process do statement.source.scan(MATCH) do |var_name, cla...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/c/handler_methods.rb
lib/yard/handlers/c/handler_methods.rb
# frozen_string_literal: true module YARD module Handlers module C module HandlerMethods include Parser::C include CodeObjects include Common::MethodHandler def handle_class(var_name, class_name, parent, in_module = nil) parent = nil if parent == "0" name...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/constant_handler.rb
lib/yard/handlers/ruby/constant_handler.rb
# frozen_string_literal: true # Handles any constant assignment class YARD::Handlers::Ruby::ConstantHandler < YARD::Handlers::Ruby::Base include YARD::Handlers::Ruby::StructHandlerMethods handles :assign namespace_only process do if statement[1].call? && statement[1][0][0] == s(:const, "Struct") && ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/public_class_method_handler.rb
lib/yard/handlers/ruby/public_class_method_handler.rb
# frozen_string_literal: true # Sets visibility of a class method to public. class YARD::Handlers::Ruby::PublicClassMethodHandler < YARD::Handlers::Ruby::Base include YARD::Handlers::Ruby::DecoratorHandlerMethods handles method_call(:public_class_method) namespace_only process do process_decorator :scope ...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/module_handler.rb
lib/yard/handlers/ruby/module_handler.rb
# frozen_string_literal: true # Handles the declaration of a module class YARD::Handlers::Ruby::ModuleHandler < YARD::Handlers::Ruby::Base handles :module namespace_only process do modname = statement[0].source mod = register ModuleObject.new(namespace, modname) parse_block(statement[1], :namespace =...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/struct_handler_methods.rb
lib/yard/handlers/ruby/struct_handler_methods.rb
# frozen_string_literal: true # Helper methods to parse @attr_* tags on a class. # # @deprecated The use of +@attr+ tags are deprecated since 0.8.0 in favour of # the +@!attribute+ directive. This module should not be relied on. # @since 0.5.6 module YARD::Handlers::Ruby::StructHandlerMethods include YARD::CodeObje...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/class_condition_handler.rb
lib/yard/handlers/ruby/class_condition_handler.rb
# frozen_string_literal: true # Matches if/unless conditions inside classes and attempts to process only # one branch (by evaluating the condition if possible). # # @example A simple class conditional # class Foo # if 0 # # This method is ignored # def xyz; end # end # end class YARD::Handlers::...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/comment_handler.rb
lib/yard/handlers/ruby/comment_handler.rb
# frozen_string_literal: true # Handles any lone comment statement in a Ruby file class YARD::Handlers::Ruby::CommentHandler < YARD::Handlers::Ruby::Base handles :comment, :void_stmt 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/method_handler.rb
lib/yard/handlers/ruby/method_handler.rb
# frozen_string_literal: true # Handles a method definition class YARD::Handlers::Ruby::MethodHandler < YARD::Handlers::Ruby::Base include YARD::Handlers::Common::MethodHandler handles :def, :defs process do meth = statement.method_name(true).to_s args = format_args blk = statement.block nobj = ...
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.rb
lib/yard/handlers/ruby/dsl_handler.rb
# frozen_string_literal: true module YARD module Handlers module Ruby # Handles automatic detection of dsl-style methods class DSLHandler < Base include CodeObjects include DSLHandlerMethods handles method_call namespace_only process { handle_comments } en...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/mixin_handler.rb
lib/yard/handlers/ruby/mixin_handler.rb
# frozen_string_literal: true # Handles the 'include' statement to mixin a module in the instance scope class YARD::Handlers::Ruby::MixinHandler < YARD::Handlers::Ruby::Base handles method_call(:include) handles method_call(:prepend) namespace_only process do errors = [] statement.parameters(false).rev...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false
lsegal/yard
https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/lib/yard/handlers/ruby/alias_handler.rb
lib/yard/handlers/ruby/alias_handler.rb
# frozen_string_literal: true # Handles alias and alias_method calls class YARD::Handlers::Ruby::AliasHandler < YARD::Handlers::Ruby::Base handles :alias, method_call(:alias_method) namespace_only process do names = [] if statement.type == :alias nodes = [:ident, :op, :kw, :const, :tstring_content,...
ruby
MIT
34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75
2026-01-04T15:58:51.996173Z
false