Class: RuboCop::GraphQL::Class
- Inherits:
-
Object
- Object
- RuboCop::GraphQL::Class
- Defined in:
- lib/rubocop/graphql/class.rb
Instance Attribute Summary collapse
-
#node ⇒ Object
readonly
Returns the value of attribute node.
Instance Method Summary collapse
-
#initialize(node) ⇒ Class
constructor
A new instance of Class.
- #nested? ⇒ Boolean
Constructor Details
#initialize(node) ⇒ Class
Returns a new instance of Class.
8 9 10 |
# File 'lib/rubocop/graphql/class.rb', line 8 def initialize(node) @node = node end |
Instance Attribute Details
#node ⇒ Object (readonly)
Returns the value of attribute node.
6 7 8 |
# File 'lib/rubocop/graphql/class.rb', line 6 def node @node end |
Instance Method Details
#nested? ⇒ Boolean
12 13 14 |
# File 'lib/rubocop/graphql/class.rb', line 12 def nested? node.each_ancestor(:class).any? end |