From 8256d9e4171361326793c5ca512ff6e02aa5d80c Mon Sep 17 00:00:00 2001 From: Awesome Code Date: Sun, 16 Jun 2024 00:52:33 +0000 Subject: [PATCH] Auto corrected by following Format Ruby Code --- lib/synvert/core/configuration.rb | 9 +++++---- spec/synvert/core/configuration_spec.rb | 2 +- spec/synvert/core/rewriter/instance_spec.rb | 6 +++++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/synvert/core/configuration.rb b/lib/synvert/core/configuration.rb index 7669eacd..7eb01dec 100644 --- a/lib/synvert/core/configuration.rb +++ b/lib/synvert/core/configuration.rb @@ -111,10 +111,11 @@ def test_result # # Code to be executed with temporary configurations # end def with_temporary_configurations(configurations, &block) - old_instance_variables = instance_variables.reduce({}) do |hash, var| - hash[var] = instance_variable_get(var) - hash - end + old_instance_variables = + instance_variables.reduce({}) do |hash, var| + hash[var] = instance_variable_get(var) + hash + end configurations.each do |variable, value| instance_variable_set("@#{variable}", value) diff --git a/spec/synvert/core/configuration_spec.rb b/spec/synvert/core/configuration_spec.rb index 7c5a5065..87896403 100644 --- a/spec/synvert/core/configuration_spec.rb +++ b/spec/synvert/core/configuration_spec.rb @@ -22,4 +22,4 @@ module Synvert::Core end end end -end \ No newline at end of file +end diff --git a/spec/synvert/core/rewriter/instance_spec.rb b/spec/synvert/core/rewriter/instance_spec.rb index 8d5ce18c..3f202e51 100644 --- a/spec/synvert/core/rewriter/instance_spec.rb +++ b/spec/synvert/core/rewriter/instance_spec.rb @@ -269,7 +269,11 @@ module Synvert::Core it 'parsers add_callback' do instance.instance_variable_set(:@current_visitor, double) block = proc {} - expect(instance.instance_variable_get(:@current_visitor)).to receive(:add_callback).with(:class_node, at: 'start', &block) + expect(instance.instance_variable_get(:@current_visitor)).to receive(:add_callback).with( + :class_node, + at: 'start', + &block + ) instance.add_callback(:class_node, at: 'start', &block) end