sig/raap.rbs in raap-0.3.0 vs sig/raap.rbs in raap-0.4.0
- old
+ new
@@ -5,11 +5,11 @@
def self.logger: () -> ::Logger
def self.logger=: (::Logger) -> void
module BindCall
def self.define_singleton_method: (untyped, Symbol) { (*untyped, **untyped) -> untyped } -> void
- def self.respond_to?: (untyped, Symbol, ?bool) -> bool
+ def self.respond_to?: (untyped, untyped, ?boolish) -> bool
def self.instance_of?: (untyped, Module) -> bool
def self.is_a?: (untyped, Module) -> bool
def self.extend: (untyped, Module) -> void
def self.name: (Module) -> String?
def self.to_s: (untyped) -> String
@@ -17,19 +17,19 @@
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: (?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, ?skips: ::Array[::String]) -> 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.[]: (?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, ?skips: ::Array[::String]) -> instance
def self.keyword_init?: () -> true
- def self.members: () -> [ :dirs, :requires, :library, :timeout, :size_from, :size_to, :size_by, :allow_private]
+ def self.members: () -> [ :dirs, :requires, :library, :timeout, :size_from, :size_to, :size_by, :allow_private, :skips]
- def members: () -> [ :dirs, :requires, :library, :timeout, :size_from, :size_to, :size_by, :allow_private]
+ def members: () -> [ :dirs, :requires, :library, :timeout, :size_from, :size_to, :size_by, :allow_private, :skips]
attr_accessor dirs: ::Array[String]
attr_accessor requires: ::Array[String]
@@ -42,48 +42,57 @@
attr_accessor size_to: ::Integer
attr_accessor size_by: ::Integer
attr_accessor allow_private: bool
+
+ attr_accessor skips: ::Array[String]
end
+ type property_result = [Integer, Symbol, ::RBS::MethodType, StringIO?]
+
+ DEFAULT_SKIP: ::Set[String]
+
@argv: Array[String]
+ @results: Array[{ method: ::RBS::Definition::Method, properties: Array[property_result] }]
def self.option: () -> Option
def self.option=: (Option) -> void
def initialize: (Array[String]) -> void
def load: () -> self
+ def run: () -> Integer
- type property_result = [Integer, Symbol, ::RBS::MethodType]
- def run: () -> self
- def run_by: (tag: String) -> Array[Array[property_result]]
- def run_by_instance: (tag: String) -> Array[Array[property_result]]
- def run_by_singleton: (tag: String) -> Array[Array[property_result]]
- def run_by_type_name: (tag: String) -> Array[Array[property_result]]
- def run_by_type_name_with_search: (tag: String) -> Array[Array[property_result]]
- def property: (receiver_type: Type, type_params_decl: Array[::RBS::AST::TypeParam], method_name: Symbol, method_type: ::RBS::MethodType) -> property_result
+ private
+
+ def run_by: (kind: (:instance | :singleton), tag: String) -> void
+ def run_by_type_name: (tag: String) -> void
+ 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
class FunctionType
@fun: ::RBS::Types::Function
def initialize: (::RBS::Types::Function) -> void
- def pick_arguments: (?size: Integer, ?eval: bool) -> [Array[untyped], Hash[Symbol, untyped]]
+ def pick_arguments: (?size: Integer) -> [Array[untyped], Hash[Symbol, untyped]]
+ def arguments_to_symbolic_call: (?size: Integer) -> [Array[untyped], Hash[Symbol, untyped]]
private
- def recursive_pick: (untyped, size: Integer, eval: bool) -> untyped
+ def to_symbolic_call_recursive: (untyped, size: Integer) -> untyped
def build_args_type: () -> Array[Type]
def build_kwargs_type: () -> Hash[Symbol, Type]
end
class MethodProperty
class Stats
attr_accessor success: Integer
attr_accessor skip: Integer
attr_accessor exception: Integer
+ attr_accessor break: bool
end
@receiver_type: Type
@method_name: Symbol
@method_type: MethodType
@@ -95,21 +104,22 @@
def run: () { (Result::Success | Result::Failure | Result::Skip | Result::Exception) -> void } -> Stats
private
def call: (size: Integer, stats: Stats) -> (Result::Success | Result::Failure | Result::Skip | Result::Exception)
- def check_return: (receiver_value: untyped, return_value: untyped, method_type: MethodType) -> bool
+ def check_return: (receiver_value: untyped, return_value: untyped) -> ([Symbol] | [Symbol, Exception])
def return_type: () -> RBS::Types::t
end
class MethodType
attr_reader rbs: ::RBS::MethodType
@fun_type: FunctionType
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, ?eval: bool) -> [Array[untyped], Hash[Symbol, untyped], ::Proc?]
- def pick_block: (?size: Integer, ?eval: bool) -> ::Proc?
+ 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?
def check_return: (untyped) -> bool
end
module Minitest
end
@@ -121,32 +131,41 @@
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.find_alias_decl: (::RBS::TypeName, Symbol) -> ::RBS::AST::Members::Alias?
end
module Result
- interface _MethodValueReturnValue
- def symbolic_call: () -> symbolic_call
+ interface _ReturnValue
def return_value: () -> untyped
end
- module CalledStr : _MethodValueReturnValue
- def called_str: () -> String
+
+ module ReturnValueWithType : _ReturnValue
+ def return_value_with_type: () -> String
+
+ private
+
+ def return_value_to_type: (untyped) -> String
end
+
class Success < Data
+ include ReturnValueWithType
def self.new: (symbolic_call: symbolic_call, return_value: untyped) -> instance
attr_reader symbolic_call: symbolic_call
attr_reader return_value: untyped
- include CalledStr
+ def called_str: () -> String
end
class Failure < Data
+ include ReturnValueWithType
def self.new: (symbolic_call: symbolic_call, return_value: untyped, ?exception: ::Exception?) -> instance
attr_reader symbolic_call: symbolic_call
attr_reader return_value: untyped
attr_reader exception: ::Exception?
- include CalledStr
+ def called_str: () -> String
end
class Skip < Data
def self.new: (symbolic_call: symbolic_call?, exception: ::Exception) -> instance
attr_reader symbolic_call: symbolic_call?
attr_reader exception: ::Exception
@@ -186,11 +205,11 @@
private
def try_eval: (untyped) -> untyped
def walk: () ?{ (symbolic_call) -> untyped} -> untyped
- def _walk: (untyped) ?{ (symbolic_call) -> untyped} -> untyped
+ def _walk: (untyped, bool is_last) ?{ (symbolic_call) -> untyped} -> untyped
def eval_one: (symbolic_call) -> untyped
def var_name: (Module) -> String
def printable?: (untyped) -> bool
def printable: (untyped) -> String
end
@@ -220,30 +239,33 @@
@such_that: (^(untyped) -> ::boolish)?
GENERATORS: Hash[String, ^() -> Sized[untyped]]
SIMPLE_SOURCE: Array[String]
- RECURSION: Hash[String, :found | :logged]
def self.register: (String) { () [self: instance] -> Sized[untyped] } -> void
+ def self.random: () -> Type
+ def self.random_without_basic_object: () -> Type
+
attr_reader type: ::RBS::Types::t
attr_reader range: Range[untyped]
def initialize: (String | ::RBS::Types::t, ?range: Range[untyped]) -> void
# Define rule for generating values
# type.such_that { |i| i != 0 }.pick #=> ensure that the value is not 0
def such_that: () { (untyped) -> boolish } -> self
# Basic API for materializing values
- def pick: (?size: Integer, ?eval: bool) -> untyped
+ def pick: (?size: Integer) -> untyped
+ def to_symbolic_caller: (?size: Integer) -> SymbolicCaller
def to_symbolic_call: (?size: Integer) -> untyped
def sized: [T] () { (Integer size) -> T } -> Sized[T]
private
- def pick_from_initialize: (::RBS::Types::ClassInstance, size: Integer) -> (symbolic_call | Value::Module)
+ def to_symbolic_call_from_initialize: (::RBS::Types::ClassInstance, size: Integer) -> (symbolic_call | Value::Module)
def parse: (String | ::RBS::Types::t) -> ::RBS::Types::t?
def try: (times: Integer, size: Integer) { (Integer size) -> untyped } -> untyped
def numeric: () -> Sized[Numeric]
def integer: () -> Sized[Integer]
@@ -252,13 +274,13 @@
def rational: () -> Sized[symbolic_call]
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 untyped: () -> Sized[untyped]
def temp_method_object: () -> ::Method
end
module Value
class Bottom < BasicObject
@@ -268,30 +290,37 @@
class Interface < BasicObject
@type: ::RBS::Types::Interface
@size: Integer
@definition: ::RBS::Definition
+ @fixed_return_value: untyped
+ @fixed_block_arguments: Array[untyped]
- def initialize: (String | ::RBS::Types::Interface, ?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
@type: ::RBS::Types::Intersection
@children: Array[Type]
@size: Integer
- def initialize: (::RBS::Types::Intersection, size: Integer) -> void
+ def initialize: (::RBS::Types::Intersection | String, ?size: Integer) -> void
+ def respond_to?: (Symbol, ?boolish) -> bool
def inspect: () -> String
def class: () -> class
end
- class Module
- attr_reader type: ::RBS::Types::ClassInstance
+ class Module < BasicObject
+ @type: ::RBS::Types::ClassInstance
+ @size: Integer
+ @self_type: untyped
- def initialize: (::RBS::Types::ClassInstance) -> void
+ def initialize: (::RBS::Types::ClassInstance | String, ?size: Integer) -> void
+ def respond_to?: (Symbol, ?boolish) -> bool
def inspect: () -> String
def class: () -> class
end
class Top < BasicObject
@@ -300,10 +329,10 @@
end
class Variable < BasicObject
attr_reader type: ::RBS::Types::Variable
- def initialize: (::RBS::Types::Variable) -> void
+ def initialize: (::RBS::Types::Variable | String | Symbol) -> void
def inspect: () -> String
def class: () -> class
end
class Void < BasicObject