Class: Datory::Attributes::Options::From
- Defined in:
- lib/datory/attributes/options/from.rb
Instance Attribute Summary
Attributes inherited from Base
#consists_of, #format, #max, #min, #name, #type
Instance Method Summary collapse
-
#initialize(name:, type:, consists_of:, min:, max:, format:) ⇒ From
constructor
A new instance of From.
Methods inherited from Base
Constructor Details
#initialize(name:, type:, consists_of:, min:, max:, format:) ⇒ From
Returns a new instance of From.
7 8 9 10 11 |
# File 'lib/datory/attributes/options/from.rb', line 7 def initialize(name:, type:, consists_of:, min:, max:, format:) format = format.fetch(:from, nil) if format.is_a?(Hash) super end |