Method: Module#attr_accessor_with_default
- Defined in:
- lib/y_support/core_ext/module/misc.rb
#attr_accessor_with_default(*symbols, &block) ⇒ Object Also known as: attr_accessor_w_default
I didn’t write this method by myself.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/y_support/core_ext/module/misc.rb', line 24 def attr_accessor_with_default *symbols, &block raise ArgumentError, 'Block with default value required!' unless block symbols.each { | |