Skip to content

Commit

Permalink
Fix Rubocop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
PanosCodes committed Dec 19, 2023
1 parent 05e3e0e commit 912316c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/apipie/errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class ParamInvalid < DefinedParamError
attr_accessor :value, :error

def initialize(param, value, error)
super param
super(param)
@value = value
@error = error
end
Expand Down
2 changes: 1 addition & 1 deletion lib/apipie/generator/swagger/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Config
HEREDOC
)

send("#{attribute}=", value)
send(:"#{attribute}=", value)
end

old_setter_method = "swagger_#{attribute}"
Expand Down
4 changes: 2 additions & 2 deletions lib/tasks/apipie.rake
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@ namespace :apipie do
av = renderer
File.open(file_name, "w") do |f|
variables.each do |var, val|
av.instance_variable_set("@#{var}", val)
av.instance_variable_set(:"@#{var}", val)
end
f.write av.render(
:template => "#{template}",
:layout => (layout && "apipie/#{layout}"))
:layout => layout && "apipie/#{layout}")
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/lib/swagger/rake_swagger_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def expect_response_params_def(http_method, path, response_code, param_name, fie

describe 'apipie:did_swagger_change[development,form_data,_tmp]' do
it "keeps a reference file" do
expect(Pathname(ref_output).children.count).to eq(2) # one file for each language
expect(Pathname(ref_output).children.count).to eq(2) # one file for each language
end
end
end
Expand Down

0 comments on commit 912316c

Please sign in to comment.