Class: HashValidator::Validations::Optional
- Inherits:
-
Object
- Object
- HashValidator::Validations::Optional
- Defined in:
- lib/hash_validator/validations/optional.rb
Instance Attribute Summary collapse
-
#validation ⇒ Object
readonly
Returns the value of attribute validation.
Instance Method Summary collapse
-
#initialize(validation) ⇒ Optional
constructor
A new instance of Optional.
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
#validation ⇒ Object (readonly)
Returns the value of attribute validation.
3 4 5 |
# File 'lib/hash_validator/validations/optional.rb', line 3 def validation @validation end |