Sha256: ff0fbcb9bacd23a436607f5801aef305f1b4f3a5182946c3d1d8c1fe38e3d0f3
Contents?: true
Size: 767 Bytes
Versions: 1
Compression:
Stored size: 767 Bytes
Contents
require 'rails/generators/base' require 'sugar-high/array' require 'active_support/inflector' require 'rails_artifactor' module CanTango module Generators class LicensesGenerator < Rails::Generators::Base desc "Creates Licenses for use with CanCan Permits" argument :licenses, :type => :array, :default => [], :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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cantango-0.8.0 | lib/generators/cantango/licenses/licenses_generator.rb |