Class: Code0::ZeroTrack::Database::Migration
- Inherits:
-
Object
- Object
- Code0::ZeroTrack::Database::Migration
- Defined in:
- lib/code0/zero_track/database/migration.rb
Defined Under Namespace
Classes: V1_0
Class Method Summary collapse
-
.[](version) ⇒ Object
rubocop:enable Naming/ClassAndModuleCamelCase.
Class Method Details
.[](version) ⇒ Object
rubocop:enable Naming/ClassAndModuleCamelCase
16 17 18 19 20 21 22 |
# File 'lib/code0/zero_track/database/migration.rb', line 16 def self.[](version) version = version.to_s name = "V#{version.tr('.', '_')}" raise ArgumentError, "Invalid migration version: #{version}" unless const_defined?(name, false) const_get(name, false) end |