Sha256: 56c6c524929a910e697e0856506a70b765f192ce59890af12c534c64bc229d2c

Contents?: true

Size: 534 Bytes

Versions: 78

Compression:

Stored size: 534 Bytes

Contents

module Neo4j
  module Migrations
    class MigrationFile
      attr_reader :file_name, :symbol_name, :class_name, :version

      def initialize(file_name)
        @file_name = file_name
        extract_data!
      end

      def create(options = {})
        require @file_name
        class_name.constantize.new(@version, options)
      end

      private

      def extract_data!
        @version, @symbol_name = File.basename(@file_name, '.rb').split('_', 2)
        @class_name = @symbol_name.camelize
      end
    end
  end
end

Version data entries

78 entries across 78 versions & 2 rubygems

Version Path
neo4j-9.6.2 lib/neo4j/migrations/migration_file.rb
activegraph-10.0.0.pre.alpha.11 lib/neo4j/migrations/migration_file.rb
activegraph-10.0.0.pre.alpha.10 lib/neo4j/migrations/migration_file.rb
activegraph-10.0.0.pre.alpha.9 lib/neo4j/migrations/migration_file.rb
activegraph-10.0.0.pre.alpha.8 lib/neo4j/migrations/migration_file.rb
activegraph-10.0.0.pre.alpha.7 lib/neo4j/migrations/migration_file.rb
activegraph-10.0.0.pre.alpha.6 lib/neo4j/migrations/migration_file.rb
neo4j-10.0.0.pre.alpha.5 lib/neo4j/migrations/migration_file.rb
neo4j-10.0.0.pre.alpha.4 lib/neo4j/migrations/migration_file.rb
neo4j-10.0.0.pre.alpha.3 lib/neo4j/migrations/migration_file.rb
neo4j-10.0.0.pre.alpha.2 lib/neo4j/migrations/migration_file.rb
neo4j-10.0.0.pre.alpha.1 lib/neo4j/migrations/migration_file.rb
neo4j-9.6.1 lib/neo4j/migrations/migration_file.rb
neo4j-9.6.0 lib/neo4j/migrations/migration_file.rb
neo4j-9.5.3 lib/neo4j/migrations/migration_file.rb
neo4j-9.5.2 lib/neo4j/migrations/migration_file.rb
neo4j-9.5.0 lib/neo4j/migrations/migration_file.rb
neo4j-9.4.0 lib/neo4j/migrations/migration_file.rb
neo4j-9.3.0 lib/neo4j/migrations/migration_file.rb
neo4j-9.2.4 lib/neo4j/migrations/migration_file.rb