Method: Cassie::Schema::VersionLoader#load
- Defined in:
- lib/cassie/schema/version_loader.rb
#load ⇒ Version, Boolean
Requires the ruby file, thus loading the Migration class into the ObjectSpace.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/cassie/schema/version_loader.rb', line 14 def load return false unless filename require filename begin # ensure the migration class is now defined version.migration_class_name.constantize if version.migration.is_a?(Cassie::Schema::Migration) version else false end rescue NameError raise NameError.new("Expected #{version.migration_class_name} to be defined in #{filename}, but it was not.") end end |