Sha256: e7e4906c824ae185fb62dcd76cb0e2282a41ee97099cfc4359081faa1a3fdc2c

Contents?: true

Size: 625 Bytes

Versions: 22

Compression:

Stored size: 625 Bytes

Contents

module Cantango
  module Generators
    class LicensesGenerator < Rails::Generators::Base
      desc "Creates Licenses for use with CanCan Permits"

      argument     :licenses,           :type => :array,      :desc => "Licenses"

      source_root File.dirname(__FILE__) + '/../license/templates'

      def main_flow
        licenses.each do |license|
          template_license(license)
        end
      end

      protected

      attr_accessor :license_name

      def template_license name
        self.license_name = name
        template "license.erb", "app/licenses/#{name}_license.rb"
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
cantango-permits-0.1.1 lib/generators/cantango/licenses/licenses_generator.rb
cantango-0.9.4.7 lib/generators/cantango/licenses/licenses_generator.rb
cantango-0.9.4.6 lib/generators/cantango/licenses/licenses_generator.rb
cantango-0.9.4.5 lib/generators/cantango/licenses/licenses_generator.rb
cantango-0.9.4.3 lib/generators/cantango/licenses/licenses_generator.rb
cantango-0.9.4.2 lib/generators/cantango/licenses/licenses_generator.rb
cantango-0.9.4.1 lib/generators/cantango/licenses/licenses_generator.rb
cantango-0.9.4 lib/generators/cantango/licenses/licenses_generator.rb
cantango-0.9.3.2 lib/generators/cantango/licenses/licenses_generator.rb
cantango-0.8.9.5 lib/generators/cantango/licenses/licenses_generator.rb
cantango-0.8.9.4 lib/generators/cantango/licenses/licenses_generator.rb
cantango-0.8.9.3 lib/generators/cantango/licenses/licenses_generator.rb
cantango-0.8.9.2 lib/generators/cantango/licenses/licenses_generator.rb
cantango-0.8.9.1 lib/generators/cantango/licenses/licenses_generator.rb
cantango-0.8.9 lib/generators/cantango/licenses/licenses_generator.rb
cantango-0.8.8.1 lib/generators/cantango/licenses/licenses_generator.rb
cantango-0.8.8 lib/generators/cantango/licenses/licenses_generator.rb
cantango-0.8.7 lib/generators/cantango/licenses/licenses_generator.rb
cantango-0.8.6.2 lib/generators/cantango/licenses/licenses_generator.rb
cantango-0.8.6.1 lib/generators/cantango/licenses/licenses_generator.rb