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
179 180 181 182 183 184 |
# File 'lib/graphql/upgrader/member.rb', line 179 def apply(input_text) input_text.sub( /(field|input_field|return_field|connection|argument)\( *(.*?) *\)( *)/, '\1 \2\3' ) end |