Module: Recliner::Properties::Set::PropertyWithSetDefault

Extended by:
ActiveSupport::Concern
Defined in:
lib/recliner/properties/set.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#default_value_with_set(instance) ⇒ Object



40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/recliner/properties/set.rb', line 40

def default_value_with_set(instance)
  result = default_value_without_set(instance)
  
  if type.superclass == Recliner::Set
    if default
      result = type[*default]
    else
      result = type.new
    end
  end
  
  result
end