Class: RuboCop::GraphQL::Argument::Block
- Inherits:
-
Object
- Object
- RuboCop::GraphQL::Argument::Block
- Extended by:
- NodePattern::Macros
- Includes:
- DescriptionMethod
- Defined in:
- lib/rubocop/graphql/argument/block.rb
Constant Summary
Constants included from DescriptionMethod
DescriptionMethod::DESCRIPTION_STRING
Instance Method Summary collapse
- #argument_block(node) ⇒ Object
- #description ⇒ Object
-
#initialize(argument_node) ⇒ Block
constructor
A new instance of Block.
Methods included from DescriptionMethod
#description_method_call?, #description_with_block_arg?, #find_description_method
Constructor Details
#initialize(argument_node) ⇒ Block
Returns a new instance of Block.
19 20 21 |
# File 'lib/rubocop/graphql/argument/block.rb', line 19 def initialize(argument_node) @nodes = argument_block(argument_node) || [] end |
Instance Method Details
#argument_block(node) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/rubocop/graphql/argument/block.rb', line 11 def_node_matcher :argument_block, <<~PATTERN (block (send nil? :argument ...) (args ...) {(begin $...)|$...} ) PATTERN |
#description ⇒ Object
23 24 25 |
# File 'lib/rubocop/graphql/argument/block.rb', line 23 def description find_description_method(@nodes) end |