Class: GraphQL::BackwardsCompatibility::FirstArgumentsWrapper Private
- Inherits:
-
Object
- Object
- GraphQL::BackwardsCompatibility::FirstArgumentsWrapper
- Defined in:
- lib/graphql/backwards_compatibility.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Direct Known Subclasses
Instance Method Summary collapse
-
#call(*args) ⇒ Object
private
-
#initialize(callable, old_arity) ⇒ FirstArgumentsWrapper
constructor
private
A new instance of FirstArgumentsWrapper.
Constructor Details
#initialize(callable, old_arity) ⇒ FirstArgumentsWrapper
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of FirstArgumentsWrapper
42 43 44 45 |
# File 'lib/graphql/backwards_compatibility.rb', line 42 def initialize(callable, old_arity) @callable = callable @old_arity = old_arity end |
Instance Method Details
#call(*args) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
47 48 49 50 |
# File 'lib/graphql/backwards_compatibility.rb', line 47 def call(*args) backwards_compat_args = args.first(@old_arity) @callable.call(*backwards_compat_args) end |