Sha256: 0f9438bb74796f2887c228c6789562d9db4598c43ac8569552fafb15a6c9ac45

Contents?: true

Size: 289 Bytes

Versions: 1

Compression:

Stored size: 289 Bytes

Contents

require 'syntax_finder'

# Check call with paren or no paren

class IfThenFinder < SyntaxFinder
  def look node
    if node.type == :call_node
      has_params = !node.arguments.nil?
      has_paren = !node.opening_loc.nil?
      inc paren: has_paren, params: has_params
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
syntax_finder-0.1.0 samples/call_paren_finder.rb