Module: RBS

Defined in:
lib/rbs/wasm/serialization_schema.rb,
lib/rbs.rb,
lib/rbs/cli.rb,
lib/rbs/diff.rb,
lib/rbs/test.rb,
lib/rbs/types.rb,
lib/rbs/buffer.rb,
lib/rbs/errors.rb,
lib/rbs/sorter.rb,
lib/rbs/source.rb,
lib/rbs/writer.rb,
lib/rbs/factory.rb,
lib/rbs/locator.rb,
lib/rbs/version.rb,
lib/rbs/cli/diff.rb,
lib/rbs/constant.rb,
lib/rbs/rewriter.rb,
lib/rbs/vendorer.rb,
lib/rbs/namespace.rb,
lib/rbs/test/hook.rb,
lib/rbs/type_name.rb,
lib/rbs/validator.rb,
lib/rbs/collection.rb,
lib/rbs/definition.rb,
lib/rbs/parser_aux.rb,
lib/rbs/repository.rb,
lib/rbs/subtractor.rb,
lib/rbs/ast/comment.rb,
lib/rbs/ast/members.rb,
lib/rbs/ast/visitor.rb,
lib/rbs/environment.rb,
lib/rbs/file_finder.rb,
lib/rbs/method_type.rb,
lib/rbs/test/errors.rb,
lib/rbs/test/tester.rb,
lib/rbs/wasm/parser.rb,
lib/rbs/cli/validate.rb,
lib/rbs/location_aux.rb,
lib/rbs/parser/token.rb,
lib/rbs/prototype/rb.rb,
lib/rbs/substitution.rb,
lib/rbs/wasm/runtime.rb,
lib/rbs/builtin_names.rb,
lib/rbs/inline_parser.rb,
lib/rbs/prototype/rbi.rb,
lib/rbs/test/observer.rb,
lib/rbs/unit_test/spy.rb,
lib/rbs/wasm/location.rb,
lib/rbs/ancestor_graph.rb,
lib/rbs/ast/annotation.rb,
lib/rbs/ast/directives.rb,
lib/rbs/ast/type_param.rb,
lib/rbs/cli/colored_io.rb,
lib/rdoc_plugin/parser.rb,
lib/rbs/test/guaranteed.rb,
lib/rbs/test/type_check.rb,
lib/rbs/ast/declarations.rb,
lib/rbs/ast/ruby/members.rb,
lib/rbs/collection/config.rb,
lib/rbs/parser/lex_result.rb,
lib/rbs/prototype/helpers.rb,
lib/rbs/prototype/runtime.rb,
lib/rbs/test/setup_helper.rb,
lib/rbs/wasm/deserializer.rb,
lib/rbs/annotate/formatter.rb,
lib/rbs/collection/cleaner.rb,
lib/rbs/collection/sources.rb,
lib/rbs/definition_builder.rb,
lib/rbs/environment_loader.rb,
lib/rbs/environment_walker.rb,
lib/rbs/environment/use_map.rb,
lib/rbs/variance_calculator.rb,
lib/rbs/annotate/annotations.rb,
lib/rbs/annotate/rdoc_source.rb,
lib/rbs/ast/ruby/annotations.rb,
lib/rbs/collection/installer.rb,
lib/rbs/prototype/node_usage.rb,
lib/rbs/ast/ruby/declarations.rb,
lib/rbs/type_alias_dependency.rb,
lib/rbs/type_alias_regularity.rb,
lib/rbs/ast/ruby/comment_block.rb,
lib/rbs/collection/sources/git.rb,
lib/rbs/unit_test/convertibles.rb,
lib/rbs/unit_test/with_aliases.rb,
lib/rbs/annotate/rdoc_annotator.rb,
lib/rbs/collection/sources/base.rb,
lib/rbs/environment/class_entry.rb,
lib/rbs/collection/sources/local.rb,
lib/rbs/environment/module_entry.rb,
lib/rbs/collection/sources/stdlib.rb,
lib/rbs/prototype/runtime/helpers.rb,
lib/rbs/unit_test/type_assertions.rb,
lib/rbs/collection/config/lockfile.rb,
lib/rbs/resolver/constant_resolver.rb,
lib/rbs/collection/sources/rubygems.rb,
lib/rbs/resolver/type_name_resolver.rb,
lib/rbs/prototype/runtime/reflection.rb,
lib/rbs/ast/ruby/helpers/constant_helper.rb,
lib/rbs/ast/ruby/helpers/location_helper.rb,
lib/rbs/definition_builder/method_builder.rb,
lib/rbs/inline_parser/comment_association.rb,
lib/rbs/definition_builder/ancestor_builder.rb,
lib/rbs/collection/config/lockfile_generator.rb,
lib/rbs/prototype/runtime/value_object_generator.rb,
sig/cli.rbs,
sig/rbs.rbs,
sig/diff.rbs,
sig/test.rbs,
sig/util.rbs,
sig/types.rbs,
sig/buffer.rbs,
sig/errors.rbs,
sig/parser.rbs,
sig/sorter.rbs,
sig/source.rbs,
sig/writer.rbs,
sig/comment.rbs,
sig/factory.rbs,
sig/locator.rbs,
sig/members.rbs,
sig/use_map.rbs,
sig/version.rbs,
sig/visitor.rbs,
sig/cli/diff.rbs,
sig/constant.rbs,
sig/location.rbs,
sig/rdoc/rbs.rbs,
sig/rewriter.rbs,
sig/typename.rbs,
sig/vendorer.rbs,
sig/namespace.rbs,
sig/validator.rbs,
sig/annotation.rbs,
sig/collection.rbs,
sig/definition.rbs,
sig/directives.rbs,
sig/repository.rbs,
sig/subtractor.rbs,
sig/type_param.rbs,
sig/environment.rbs,
sig/file_finder.rbs,
sig/test/errors.rbs,
sig/cli/validate.rbs,
sig/declarations.rbs,
sig/method_types.rbs,
sig/prototype/rb.rbs,
sig/substitution.rbs,
sig/builtin_names.rbs,
sig/inline_parser.rbs,
sig/prototype/rbi.rbs,
sig/unit_test/spy.rbs,
sig/ancestor_graph.rbs,
sig/cli/colored_io.rbs,
sig/method_builder.rbs,
sig/test/guranteed.rbs,
sig/test/type_check.rbs,
sig/ancestor_builder.rbs,
sig/ast/ruby/members.rbs,
sig/resolver/context.rbs,
sig/collection/config.rbs,
sig/prototype/helpers.rbs,
sig/prototype/runtime.rbs,
sig/wasm/deserializer.rbs,
sig/annotate/formatter.rbs,
sig/collection/cleaner.rbs,
sig/collection/sources.rbs,
sig/definition_builder.rbs,
sig/environment_loader.rbs,
sig/environment_walker.rbs,
sig/variance_calculator.rbs,
sig/annotate/annotations.rbs,
sig/annotate/rdoc_source.rbs,
sig/ast/ruby/annotations.rbs,
sig/collection/installer.rbs,
sig/prototype/node_usage.rbs,
sig/ast/ruby/declarations.rbs,
sig/type_alias_dependency.rbs,
sig/type_alias_regularity.rbs,
sig/ast/ruby/comment_block.rbs,
sig/unit_test/convertibles.rbs,
sig/unit_test/with_aliases.rbs,
sig/annotate/rdoc_annotater.rbs,
sig/environment/class_entry.rbs,
sig/environment/module_entry.rbs,
sig/unit_test/type_assertions.rbs,
sig/wasm/serialization_schema.rbs,
sig/collection/config/lockfile.rbs,
sig/resolver/constant_resolver.rbs,
sig/resolver/type_name_resolver.rbs,
sig/ast/ruby/helpers/constant_helper.rbs,
sig/ast/ruby/helpers/location_helper.rbs,
sig/inline_parser/comment_association.rbs,
sig/collection/config/lockfile_generator.rbs

Overview

This file is generated by the templates/template.rb script and should not be modified manually. To change the template see templates/lib/rbs/wasm/serialization_schema.rb.erb

Defined Under Namespace

Modules: AST, Annotate, BuiltinNames, Collection, DetailedMessageable, FileFinder, MethodNameHelper, Prototype, RDocPlugin, Resolver, Source, Test, Types, UnitTest, WASM, _HashEqual, _Location, _MethodName Classes: AncestorGraph, BaseError, Buffer, CLI, ClassInstanceVariableDuplicationError, Constant, CyclicClassAliasDefinitionError, CyclicTypeParameterBound, Definition, DefinitionBuilder, DefinitionError, Diff, DuplicatedDeclarationError, DuplicatedInterfaceMethodDefinitionError, DuplicatedMethodDefinitionError, Environment, EnvironmentLoader, EnvironmentWalker, Factory, GenericParameterMismatchError, InconsistentClassModuleAliasError, InheritModuleError, InlineParser, InstanceVariableDuplicationError, InvalidOverloadMethodError, InvalidTypeApplicationError, InvalidVarianceAnnotationError, LoadingError, Location, Locator, MethodType, MixinClassError, Namespace, NoMixinFoundError, NoSelfTypeFoundError, NoSuperclassFoundError, NoTypeFoundError, NonregularTypeAliasError, Parser, ParsingError, RecursiveAliasDefinitionError, RecursiveAncestorError, RecursiveTypeAliasError, Repository, Rewriter, Sorter, Substitution, Subtractor, SuperclassMismatchError, TypeAliasDependency, TypeAliasRegularity, TypeName, TypeParamDefaultReferenceError, UnknownMethodAliasError, Validator, VariableDuplicationError, VarianceCalculator, Vendorer, Writer

Constant Summary collapse

VERSION =

Returns:

  • (String)
"4.1.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.logger_levelInteger?

Returns the value of attribute logger_level.

Returns:

  • (Integer, nil)


89
90
91
# File 'lib/rbs.rb', line 89

def logger_level
  @logger_level
end

.logger_outputObject

Returns the value of attribute logger_output.



90
91
92
# File 'lib/rbs.rb', line 90

def logger_output
  @logger_output
end

Class Method Details

.loggerLogger

Returns:

  • (Logger)


92
93
94
# File 'lib/rbs.rb', line 92

def logger
  @logger ||= Logger.new(logger_output || STDERR, level: logger_level || Logger::WARN, progname: "rbs")
end

This method returns an undefined value.

Yields:

Yield Returns:

  • (String)


106
107
108
109
110
111
112
113
114
115
# File 'lib/rbs.rb', line 106

def print_warning()
  @warnings ||= Set[]

  message = yield()

  unless @warnings.include?(message)
    @warnings << message
    logger.warn { message }
  end
end