Method: ActiveData::Model::Attributes::Reflections::Base.build

Defined in:
lib/active_data/model/attributes/reflections/base.rb

.build(_target, _generated_methods, name, *args, &block) ⇒ Object



8
9
10
11
12
13
# File 'lib/active_data/model/attributes/reflections/base.rb', line 8

def build(_target, _generated_methods, name, *args, &block)
  options = args.extract_options!
  options[:type] = args.first if args.first
  options[:default] = block if block
  new(name, options)
end