Class: Availabiliter::OptionsValidator
- Inherits:
-
Object
- Object
- Availabiliter::OptionsValidator
- Defined in:
- lib/availabiliter/options_validator.rb
Overview
Verify that the options input are valid
Instance Attribute Summary collapse
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#maximum_availability_end ⇒ Object
readonly
Returns the value of attribute maximum_availability_end.
-
#minimum_availability_start ⇒ Object
readonly
Returns the value of attribute minimum_availability_start.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(minimum_availability_start:, maximum_availability_end:, format:, **_options) ⇒ OptionsValidator
constructor
A new instance of OptionsValidator.
Constructor Details
#initialize(minimum_availability_start:, maximum_availability_end:, format:, **_options) ⇒ OptionsValidator
Returns a new instance of OptionsValidator.
6 7 8 9 10 |
# File 'lib/availabiliter/options_validator.rb', line 6 def initialize(minimum_availability_start:, maximum_availability_end:, format:, **) @minimum_availability_start = minimum_availability_start @maximum_availability_end = maximum_availability_end @format = format end |
Instance Attribute Details
#format ⇒ Object (readonly)
Returns the value of attribute format.
4 5 6 |
# File 'lib/availabiliter/options_validator.rb', line 4 def format @format end |
#maximum_availability_end ⇒ Object (readonly)
Returns the value of attribute maximum_availability_end.
4 5 6 |
# File 'lib/availabiliter/options_validator.rb', line 4 def maximum_availability_end @maximum_availability_end end |
#minimum_availability_start ⇒ Object (readonly)
Returns the value of attribute minimum_availability_start.
4 5 6 |
# File 'lib/availabiliter/options_validator.rb', line 4 def minimum_availability_start @minimum_availability_start end |
Instance Method Details
#call ⇒ Object
12 13 14 15 16 |
# File 'lib/availabiliter/options_validator.rb', line 12 def call validate_format validate_boundary_class validate_boundary_value end |