Method: ConfigScripts::Seeds::SeedType#when_reading
- Defined in:
- lib/config_scripts/seeds/seed_type.rb
#when_reading(attribute, &block) ⇒ Object
This method registers a custom block that will be run when reading a value from the seed file.
This method takes a block that will be run on the value from the seed file. The return value of the block will be used in place of the original value from the seed file.
143 144 145 |
# File 'lib/config_scripts/seeds/seed_type.rb', line 143 def when_reading(attribute, &block) @dynamic_readers[attribute] = block end |