Sha256: f51cd0d6d09386261379691a8d534c9cb552ab4220f1aa89d4210b50d6e3d6db

Contents?: true

Size: 678 Bytes

Versions: 2

Compression:

Stored size: 678 Bytes

Contents

require 'script/generator/manifest'
require 'script/generator/base'

module ActiveMerchant #:nodoc:
  module Generator
    class Generator
      def self.run(args = [])
        unless args.size == 2
          puts <<-BANNER
Usage: script/generate <generator> <ClassName>
Where <generator> is one of:
  gateway     - Generate a new payment gateway
  integration - Generate a new payment integration
          BANNER
          exit
        end
  
        generator, class_name = ARGV  
        require "script/generator/generators/#{generator}/#{generator}_generator"
        "#{generator.classify}Generator".constantize.new(generator, class_name).run
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activemerchant-1.2.0 script/generator/generator.rb
activemerchant-1.2.1 script/generator/generator.rb