Skip to content

Commit

Permalink
Auto corrected by following Format Ruby Code
Browse files Browse the repository at this point in the history
  • Loading branch information
Awesome Code committed Jun 16, 2024
1 parent b9bc0ff commit 8256d9e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
9 changes: 5 additions & 4 deletions lib/synvert/core/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion spec/synvert/core/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ module Synvert::Core
end
end
end
end
end
6 changes: 5 additions & 1 deletion spec/synvert/core/rewriter/instance_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 8256d9e

Please sign in to comment.