Sha256: 3ab38db26a7ec090335efc463b1a427446767930ec39cbf08b446a9f0fec272e
Contents?: true
Size: 502 Bytes
Versions: 10
Compression:
Stored size: 502 Bytes
Contents
# encoding: utf-8 module Rubocop module Cop # Common functionality for checking if nodes. module IfNode def modifier_if?(node) node.loc.end.nil? end def ternary_op?(node) node.loc.respond_to?(:question) end def elsif?(node) node.loc.respond_to?(:keyword) && node.loc.keyword && node.loc.keyword.is?('elsif') end def if_else?(node) node.loc.respond_to?(:else) && node.loc.else end end end end
Version data entries
10 entries across 10 versions & 1 rubygems