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-8.3.2 lib/neo4j/migrations/migration_file.rb
neo4j-9.0.2 lib/neo4j/migrations/migration_file.rb
neo4j-8.3.1 lib/neo4j/migrations/migration_file.rb
neo4j-9.0.1 lib/neo4j/migrations/migration_file.rb
neo4j-9.0.0 lib/neo4j/migrations/migration_file.rb
neo4j-8.3.0 lib/neo4j/migrations/migration_file.rb
neo4j-8.2.5 lib/neo4j/migrations/migration_file.rb
neo4j-8.2.4 lib/neo4j/migrations/migration_file.rb
neo4j-8.2.3 lib/neo4j/migrations/migration_file.rb
neo4j-8.2.2 lib/neo4j/migrations/migration_file.rb
neo4j-8.2.1 lib/neo4j/migrations/migration_file.rb
neo4j-8.1.5 lib/neo4j/migrations/migration_file.rb
neo4j-8.1.4 lib/neo4j/migrations/migration_file.rb
neo4j-8.1.3 lib/neo4j/migrations/migration_file.rb
neo4j-8.1.2 lib/neo4j/migrations/migration_file.rb
neo4j-8.1.1 lib/neo4j/migrations/migration_file.rb
neo4j-8.1.0 lib/neo4j/migrations/migration_file.rb
neo4j-8.1.0.rc.2 lib/neo4j/migrations/migration_file.rb
neo4j-8.0.18 lib/neo4j/migrations/migration_file.rb
neo4j-8.1.0.rc.1 lib/neo4j/migrations/migration_file.rb