Module: Disposable::Twin::Default

Defined in:
lib/disposable/twin/default.rb

Overview

TODO: allow default: -> for hashes, etc.

Instance Method Summary collapse

Instance Method Details

#default_for(dfn, options) ⇒ Object



9
10
11
# File 'lib/disposable/twin/default.rb', line 9

def default_for(dfn, options)
  dfn[:default]
end

#setup_value_for(dfn, options) ⇒ Object



3
4
5
6
7
# File 'lib/disposable/twin/default.rb', line 3

def setup_value_for(dfn, options)
  value = super
  return value unless value.nil?
  default_for(dfn, options)
end