Class: Croesus::Validations::Optional

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(validation) ⇒ Optional

Returns a new instance of Optional.



23
24
25
# File 'lib/croesus/validations/optional.rb', line 23

def initialize(validation)
  @validation = validation
end

Instance Attribute Details

#validationObject (readonly)

Returns the value of attribute validation.



22
23
24
# File 'lib/croesus/validations/optional.rb', line 22

def validation
  @validation
end