sig/raap.rbs in raap-0.6.0 vs sig/raap.rbs in raap-0.8.0

- old
+ new

@@ -17,35 +17,31 @@ def self.inspect: (untyped) -> String end class CLI class Option < ::Struct[untyped] - def self.new: (?dirs: ::Array[String], ?requires: ::Array[String], ?libraries: ::Array[String], ?timeout: (Integer | Float | nil), ?size_from: ::Integer, ?size_to: ::Integer, ?size_by: ::Integer, ?allow_private: bool) -> instance + def self.new: (?timeout: (Integer | Float | nil), ?size_from: ::Integer, ?size_to: ::Integer, ?size_by: ::Integer, ?allow_private: bool, ?coverage: bool) -> instance - def self.[]: (?dirs: ::Array[String], ?requires: ::Array[String], ?libraries: ::Array[String], ?timeout: (Integer | Float | nil), ?size_from: ::Integer, ?size_to: ::Integer, ?size_by: ::Integer, ?allow_private: bool) -> instance + def self.[]: (?timeout: (Integer | Float | nil), ?size_from: ::Integer, ?size_to: ::Integer, ?size_by: ::Integer, ?allow_private: bool, ?coverage: bool) -> instance def self.keyword_init?: () -> true - def self.members: () -> [ :dirs, :requires, :library, :timeout, :size_from, :size_to, :size_by, :allow_private] + def self.members: () -> [ :timeout, :size_from, :size_to, :size_by, :allow_private, :coverage] - def members: () -> [ :dirs, :requires, :library, :timeout, :size_from, :size_to, :size_by, :allow_private] + def members: () -> [ :timeout, :size_from, :size_to, :size_by, :allow_private, :coverage] - attr_accessor dirs: ::Array[String] - - attr_accessor requires: ::Array[String] - - attr_accessor libraries: ::Array[String] - attr_accessor timeout: (Integer | Float | nil) attr_accessor size_from: ::Integer attr_accessor size_to: ::Integer attr_accessor size_by: ::Integer attr_accessor allow_private: bool + + attr_accessor coverage: bool end type property_result = [Integer, Symbol, ::RBS::MethodType, StringIO?] DEFAULT_SKIP: ::Set[String] @@ -69,22 +65,57 @@ def run_by_type_name_with_search: (tag: String) -> void def property: (receiver_type: Type, type_params_decl: Array[::RBS::AST::TypeParam], type_args: Array[::RBS::Types::t], method_name: Symbol, method_type: ::RBS::MethodType) -> property_result def report: () -> Integer end + module Coverage + type locs = [::RBS::Buffer::loc, ::RBS::Buffer::loc] + class Writer + @method_type: ::RBS::MethodType + @cov: ::Set[Symbol] + @cur: Integer + + def initialize: (::RBS::MethodType, Set[Symbol]) -> void + def write: (IO) -> void + + private + + def method_type_location: () -> ::RBS::Location[untyped, untyped] + def slice: (Integer, Range[Integer]) -> String + def write_param: (IO, String, ::RBS::Types::Function::Param) -> void + def write_type: (IO, String, ::RBS::Types::t) -> void + def green: (String) -> String + def red: (String) -> String + end + + self.@cov: Set[Symbol]? + self.@method_type: ::RBS::MethodType + + def self.start: (::RBS::MethodType) -> void + def self.running?: () -> bool + def self.log: (String | Symbol) -> void + def self.cov: () -> Set[Symbol] + def self.show: (IO) -> void + def self.new_type_with_log: (String, ::RBS::Types::t) -> Type + def self.log_with_type: (String, ::RBS::Types::t) -> nil + | (String, ::RBS::Types::t) ?{ (::RBS::Types::t) -> Type } -> Type + end + class FunctionType @fun: ::RBS::Types::Function + @coverage: boolish - def initialize: (::RBS::Types::Function) -> void + def initialize: (::RBS::Types::Function, ?coverage: boolish) -> void def pick_arguments: (?size: Integer) -> [Array[untyped], Hash[Symbol, untyped]] def arguments_to_symbolic_call: (?size: Integer) -> [Array[untyped], Hash[Symbol, untyped]] private def to_symbolic_call_recursive: (untyped, size: Integer) -> untyped def build_args_type: () -> Array[Type] def build_kwargs_type: () -> Hash[Symbol, Type] + def build_type_with_coverage: (String, ::RBS::Types::Function::Param) -> Type end class MethodProperty class Stats attr_accessor success: Integer @@ -106,15 +137,18 @@ private def call: (size: Integer, stats: Stats) -> (Result::Success | Result::Failure | Result::Skip | Result::Exception) def check_return: (receiver_value: untyped, return_value: untyped) -> ([Symbol] | [Symbol, Exception]) def return_type: () -> RBS::Types::t + def original_return_type: () -> RBS::Types::t + def coverage: (String, untyped, RBS::Types::t, ?RBS::Test::TypeCheck?) -> void end class MethodType attr_reader rbs: ::RBS::MethodType @fun_type: FunctionType + @type_check: ::RBS::Test::TypeCheck def initialize: (::RBS::MethodType | String method, ?type_params_decl: Array[untyped], ?type_args: Array[untyped], ?self_type: ::RBS::Types::ClassInstance?, ?instance_type: ::RBS::Types::ClassInstance?, ?class_type: ::RBS::Types::ClassSingleton?) -> void def pick_arguments: (?size: Integer) -> [Array[untyped], Hash[Symbol, untyped], ::Proc?] def arguments_to_symbolic_call: (?size: Integer) -> [Array[untyped], Hash[Symbol, untyped], ::Proc?] def pick_block: (?size: Integer) -> ::Proc? @@ -132,10 +166,12 @@ def self.builder: () -> ::RBS::DefinitionBuilder def self.env: () -> ::RBS::Environment def self.loader: () -> ::RBS::EnvironmentLoader def self.parse_type: (String) -> ::RBS::Types::t def self.parse_method_type: (String) -> ::RBS::MethodType + def self.parse_member: (String) -> ::RBS::AST::Members::Attribute + def self._shift_location: (untyped, Integer) -> void def self.find_alias_decl: (::RBS::TypeName, Symbol) -> ::RBS::AST::Members::Alias? end module Result interface _ReturnValue @@ -240,11 +276,11 @@ @such_that: (^(untyped) -> ::boolish)? GENERATORS: Hash[String, ^() -> Sized[untyped]] SIMPLE_SOURCE: Array[String] - def self.register: (String) { () [self: instance] -> Sized[untyped] } -> void + def self.register: (String) { () [self: instance] -> untyped } -> void def self.random: () -> Type def self.random_without_basic_object: () -> Type def self.call_new_from: (Module, ::RBS::Types::ClassInstance, size: Integer) -> symbolic_call attr_reader type: ::RBS::Types::t @@ -276,34 +312,34 @@ def complex: () -> Sized[symbolic_call] def string: () -> Sized[String] def symbol: () -> Sized[Symbol] def array: (Type) -> Sized[Array[untyped]] def dict: (Type, Type) -> Sized[Hash[untyped, untyped]] - def encoding: () -> Sized[symbolic_call] - def bool: () -> Sized[bool] + def encoding: () -> symbolic_call + def bool: () -> bool def temp_method_object: () -> ::Method end module Value class Bottom < BasicObject def inspect: () -> String def class: () -> class end - class Interface < BasicObject + class Interface @type: ::RBS::Types::Interface @size: Integer @definition: ::RBS::Definition - def self.define_method_from_interface: (Class base_class, String | ::RBS::Types::Interface type, ?size: Integer) -> void + def self.define_method_from_interface: (::Module base_class, String | ::RBS::Types::Interface type, ?size: Integer) -> void def initialize: (String | ::RBS::Types::Interface | String, ?size: Integer) -> void def respond_to?: (Symbol, ?boolish) -> bool def inspect: () -> String def class: () -> class end - class Intersection < BasicObject + module Intersection @type: ::RBS::Types::Intersection @children: Array[Type] @size: Integer def initialize: (::RBS::Types::Intersection | String, ?size: Integer) -> void @@ -326,10 +362,10 @@ class Top < BasicObject def inspect: () -> String def class: () -> class end - class Variable < BasicObject + class Variable attr_reader type: ::RBS::Types::Variable def initialize: (::RBS::Types::Variable | String | Symbol) -> void def inspect: () -> String def class: () -> class