Class: RuboCop::Cop::IndexMethod::Captures
- Inherits:
-
Struct
- Object
- Struct
- RuboCop::Cop::IndexMethod::Captures
- Defined in:
- lib/rubocop/cop/mixin/index_method.rb
Overview
Internal helper class to hold match data
Instance Attribute Summary collapse
-
#transformed_argname ⇒ Object
Returns the value of attribute transformed_argname.
-
#transforming_body_expr ⇒ Object
Returns the value of attribute transforming_body_expr.
Instance Method Summary collapse
Instance Attribute Details
#transformed_argname ⇒ Object
Returns the value of attribute transformed_argname
10 11 12 |
# File 'lib/rubocop/cop/mixin/index_method.rb', line 10 def transformed_argname @transformed_argname end |
#transforming_body_expr ⇒ Object
Returns the value of attribute transforming_body_expr
10 11 12 |
# File 'lib/rubocop/cop/mixin/index_method.rb', line 10 def transforming_body_expr @transforming_body_expr end |
Instance Method Details
#noop_transformation? ⇒ Boolean
14 15 16 |
# File 'lib/rubocop/cop/mixin/index_method.rb', line 14 def noop_transformation? transforming_body_expr.lvar_type? && transforming_body_expr.children == [transformed_argname] end |