Class: Datory::Attributes::Options::From

Inherits:
Base
  • Object
show all
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

Methods inherited from Base

#info

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