Skip to content

Commit

Permalink
Fixes #37427 - Fix Style/KeywordParametersOrder
Browse files Browse the repository at this point in the history
This cop ensures that optional keyword parameters are positioned at the
end of the parameters list. This promotes readability by following the
common convention of placing required parameters first and optional
parameters last.

https://docs.rubocop.org/rubocop/cops_style.html#stylekeywordparametersorder
  • Loading branch information
archanaserver committed Oct 17, 2024
1 parent c670a74 commit a24a210
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/services/foreman/renderer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def render_template_to_tempfile(template:, prefix:, host: nil, params: {}, varia
file
end

def get_source(klass: nil, template:, **args)
def get_source(template:, klass: nil, **args)
klass ||= Foreman::Renderer::Source::Database
klass.new(template)
end
Expand Down
2 changes: 1 addition & 1 deletion app/services/foreman/renderer/source/string.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Foreman
module Renderer
module Source
class String < Foreman::Renderer::Source::Base
def initialize(name: 'Unnamed', content:)
def initialize(content:, name: 'Unnamed')
@name = name
@content = content
end
Expand Down

0 comments on commit a24a210

Please sign in to comment.