Sha256: 5f031196a6f69dcd65eacaaf76f16f939c00dde59bdb74fe032bbc17bffed319

Contents?: true

Size: 529 Bytes

Versions: 3

Compression:

Stored size: 529 Bytes

Contents

require 'rubygems'
require 'active_record'

class MigrationGenerator < RubiGen::Base

  attr_reader :name,:class_name,:file_name

  def initialize(runtime_args, runtime_options = {})
    super
    usage if args.empty?
    @destination_root = File.expand_path('.')
    @name             = args.shift
    @file_name        = @name.pluralize.underscore
    @class_name       = @name.singularize.classify
  end

  def manifest
    record do |m|
      m.migration_template 'migration.rb', "test/app_root/db/migrate"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
newplugin-0.0.3 generators/migration/migration_generator.rb
newplugin-0.0.2 generators/migration/migration_generator.rb
newplugin-0.0.1 generators/migration/migration_generator.rb