Class: HashValidator::Validations::Optional

Inherits:
Object
  • Object
show all
Defined in:
lib/hash_validator/validations/optional.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(validation) ⇒ Optional

Returns a new instance of Optional.



4
5
6
# File 'lib/hash_validator/validations/optional.rb', line 4

def initialize(validation)
  @validation = validation
end

Instance Attribute Details

#validationObject (readonly)

Returns the value of attribute validation.



3
4
5
# File 'lib/hash_validator/validations/optional.rb', line 3

def validation
  @validation
end