Skip to content

Commit

Permalink
reformat method and fix validator
Browse files Browse the repository at this point in the history
  • Loading branch information
erluti committed Sep 12, 2024
1 parent 83c190a commit f220c4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/validation/custom_method_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Definitions
module Validation
class CustomMethod
VALID_ARGUMENTS = ["date", "year", "month", "day"]
VALID_ARGUMENTS = ["date", "year", "month", "day", "region"]

def call(methods)
methods.each do |name, method|
Expand Down
3 changes: 1 addition & 2 deletions us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ methods:
# all other states it's observed like "to_weekday_if_weekend"
arguments: date, region
ruby: |
if region == 'us_ut'
if region == "us_ut"
case date.wday
when 1
date
Expand All @@ -385,7 +385,6 @@ methods:
else
date
end
election_day:
# Tuesday after the first Monday of November
arguments: year
Expand Down

0 comments on commit f220c4c

Please sign in to comment.