Class: GraphQL::Upgrader::RemoveMethodParensTransform
- Defined in:
- lib/graphql/upgrader/member.rb
Overview
Remove parens from method call - normalize for processing
Instance Method Summary collapse
Methods inherited from Transform
#apply_processor, #normalize_type_expression, #reindent_lines, #trim_lines, #underscorize
Instance Method Details
#apply(input_text) ⇒ Object
183 184 185 186 187 188 |
# File 'lib/graphql/upgrader/member.rb', line 183 def apply(input_text) input_text.sub( /(field|input_field|return_field|connection|argument)\( *(.*?) *\)( *)/, '\1 \2\3' ) end |