Skip to content

Commit

Permalink
refactor: Simplify name formatting method
Browse files Browse the repository at this point in the history
  • Loading branch information
kylewelsby committed Jun 28, 2024
1 parent 856eea6 commit 32a565b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/name_formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def parse(name, last_name_only: false)
}
end

def parse_formatted(name, **options)
parsed = parse(name, **options)
def parse_formatted(name, **)
parsed = parse(name, **)
{
prefix: format_prefix(parsed[:prefix]),
first_name: format_first_name(parsed[:first_name]),
Expand All @@ -68,8 +68,8 @@ def parse_formatted(name, **options)
}
end

def format(name, **options)
parse_formatted(name, **options).values.compact.join(" ")
def format(name, **)
parse_formatted(name, **).values.compact.join(" ")
end

private
Expand Down

0 comments on commit 32a565b

Please sign in to comment.