From 061353e0f084ecbe1c02d1b2667e0b2f1cd29045 Mon Sep 17 00:00:00 2001 From: Eric Mueller Date: Mon, 13 Nov 2023 17:56:48 -0800 Subject: [PATCH] add failures --- sig/environment_helpers.rbs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sig/environment_helpers.rbs b/sig/environment_helpers.rbs index e98fccb..2099210 100644 --- a/sig/environment_helpers.rbs +++ b/sig/environment_helpers.rbs @@ -25,9 +25,6 @@ module EnvironmentHelpers class InvalidRangeText < InvalidValue end - class InvalidIntegerText < InvalidValue - end - class InvalidDateText < InvalidValue end @@ -41,7 +38,6 @@ module EnvironmentHelpers private def fetch_value: (String name, required: bool) -> String? private def check_default_type: (String | Symbol context, untyped value, *Class types) -> void - private def check_default_value: (String | Symbol context, untyped value, allow: Enumerable[untyped]) -> void end module FileHelpers : AccessHelpers @@ -50,13 +46,13 @@ module EnvironmentHelpers module DatetimeHelpers : AccessHelpers type date_time_result = DateTime? | Time? - def date: (String name, format: String, default: Date?, required: bool) -> Date? + def date: (String name, format: String, default: Integer, required: bool) -> Date? def date_time: (String name, format: String | Symbol, default: date_time_result, required: bool) -> date_time_result private def parse_date_from: (String? text, format: String) -> Date? private def parse_date_time_from: (String? text, format: String | Symbol) -> DateTime? private def iso8601_date_time: (String) -> DateTime? private def unix_date_time: (String) -> DateTime? - private def strptime_date_time: (String, format: String) -> DateTime? + private def strptime_date_time: (String, format: Date) -> DateTime? end module NumericHelpers : AccessHelpers