Sha256: 175da2aeb16f250317a7c106a52e7945391de5b5c18e363c42212d5d7ee3e073
Contents?: true
Size: 540 Bytes
Versions: 43
Compression:
Stored size: 540 Bytes
Contents
module ActiveGraph 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
43 entries across 43 versions & 1 rubygems