mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Remove unused RT parameter
This commit is contained in:
parent
27acf7bced
commit
51a47fec98
6 changed files with 8 additions and 8 deletions
|
@ -7,7 +7,7 @@ module Spectator::Mocks
|
|||
super(name, source, args)
|
||||
end
|
||||
|
||||
def call(_args : GenericArguments(T2, NT2), rt : RT.class) forall T2, NT2, RT
|
||||
def call(_args : GenericArguments(T2, NT2)) forall T2, NT2
|
||||
raise @exception
|
||||
end
|
||||
end
|
||||
|
|
|
@ -14,10 +14,10 @@ module Spectator::Mocks
|
|||
@name == call.name
|
||||
end
|
||||
|
||||
abstract def call(args : GenericArguments(T, NT), rt : RT.class) forall T, NT, RT
|
||||
abstract def call(args : GenericArguments(T, NT)) forall T, NT
|
||||
|
||||
def call!(args : GenericArguments(T, NT), rt : RT.class) : RT forall T, NT, RT
|
||||
value = call(args, rt)
|
||||
def call!(args : GenericArguments(T, NT), _rt : RT.class) : RT forall T, NT, RT
|
||||
value = call(args)
|
||||
if value.is_a?(RT)
|
||||
value.as(RT)
|
||||
else
|
||||
|
|
|
@ -10,7 +10,7 @@ module Spectator::Mocks
|
|||
raise ArgumentError.new("Values must have at least one item") if @values.size < 1
|
||||
end
|
||||
|
||||
def call(_args : GenericArguments(T2, NT2), rt : RT.class) forall T2, NT2, RT
|
||||
def call(_args : GenericArguments(T2, NT2)) forall T2, NT2
|
||||
value = @values[@index]
|
||||
@index += 1 if @index < @values.size - 1
|
||||
value
|
||||
|
|
|
@ -4,7 +4,7 @@ require "./value_method_stub"
|
|||
|
||||
module Spectator::Mocks
|
||||
class NilMethodStub < GenericMethodStub(Nil)
|
||||
def call(_args : GenericArguments(T, NT), _rt : RT.class) forall T, NT, RT
|
||||
def call(_args : GenericArguments(T, NT)) forall T, NT
|
||||
nil
|
||||
end
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ module Spectator::Mocks
|
|||
ProcMethodStub.new(name, source, block, args)
|
||||
end
|
||||
|
||||
def call(_args : GenericArguments(T2, NT2), rt : RT.class) forall T2, NT2, RT
|
||||
def call(_args : GenericArguments(T2, NT2)) forall T2, NT2
|
||||
@proc.call
|
||||
end
|
||||
end
|
||||
|
|
|
@ -7,7 +7,7 @@ module Spectator::Mocks
|
|||
super(name, source, args)
|
||||
end
|
||||
|
||||
def call(_args : GenericArguments(T2, NT2), rt : RT.class) forall T2, NT2, RT
|
||||
def call(_args : GenericArguments(T2, NT2)) forall T2, NT2
|
||||
@value
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue