lib/rubocop/cop/github/render_literal_helpers.rb in rubocop-github-0.16.1 vs lib/rubocop/cop/github/render_literal_helpers.rb in rubocop-github-0.16.2

- old
+ new

@@ -18,22 +18,22 @@ def_node_matcher :render_literal?, <<-PATTERN (send nil? {:render :render_to_string} ({str sym} $_) $...) PATTERN - def_node_matcher :render_inst?, <<-PATTERN - (send nil? {:render :render_to_string} (send _ :new ...) ...) - PATTERN - def_node_matcher :render_with_options?, <<-PATTERN (send nil? {:render :render_to_string} (hash $...) ...) PATTERN def_node_matcher :render_view_component_instance?, <<-PATTERN (send nil? {:render :render_to_string} (send _ :new ...) ...) PATTERN + def_node_matcher :render_view_component_instance_with_content?, <<-PATTERN + (send nil? {:render :render_to_string} (send (send _ :new ...) `:with_content ...)) + PATTERN + def_node_matcher :render_view_component_collection?, <<-PATTERN (send nil? {:render :render_to_string} (send _ :with_collection ...) ...) PATTERN def_node_matcher :locals_key?, <<-PATTERN @@ -43,10 +43,11 @@ def hash_with_literal_keys?(hash) hash.pairs.all? { |pair| literal?(pair.key) } end def render_view_component?(node) - render_view_component_instance?(node) || + render_view_component_instance_with_content?(node) || + render_view_component_instance?(node) || render_view_component_collection?(node) end end end end