lib/tapioca/rbi_ext/model.rb in tapioca-0.10.1 vs lib/tapioca/rbi_ext/model.rb in tapioca-0.10.2
- old
+ new
@@ -30,11 +30,11 @@
sig do
params(
name: String,
superclass_name: T.nilable(String),
- block: T.nilable(T.proc.params(scope: RBI::Scope).void)
+ block: T.nilable(T.proc.params(scope: RBI::Scope).void),
).returns(Scope)
end
def create_class(name, superclass_name: nil, &block)
T.cast(create_node(RBI::Class.new(name, superclass_name: superclass_name)), RBI::Scope).tap do |node|
block&.call(node)
@@ -66,11 +66,11 @@
name: String,
type: String,
variance: Symbol,
fixed: T.nilable(String),
upper: T.nilable(String),
- lower: T.nilable(String)
+ lower: T.nilable(String),
).void
end
def create_type_variable(name, type:, variance: :invariant, fixed: nil, upper: nil, lower: nil)
value = Tapioca::RBIHelper.serialize_type_variable(type, variance, fixed, upper, lower)
create_node(RBI::TypeMember.new(name, value))
@@ -80,10 +80,10 @@
params(
name: String,
parameters: T::Array[TypedParam],
return_type: String,
class_method: T::Boolean,
- visibility: RBI::Visibility
+ visibility: RBI::Visibility,
).void
end
def create_method(name, parameters: [], return_type: "T.untyped", class_method: false, visibility: RBI::Public.new)
return unless Tapioca::RBIHelper.valid_method_name?(name)