Sha256: d23251330691521fe4dcf153de050fada646210ef1029ce27de968aad98f50cd
Contents?: true
Size: 702 Bytes
Versions: 15
Compression:
Stored size: 702 Bytes
Contents
module HorsePower class AuthorizationGenerator < Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) argument :resource_name, :type => :string argument :api_version, :type => :string, :default => "1" argument :attributes, type: :array, default: [], banner: "field:type field:type" def sprint template "auth_file.rb.erb", "gems/authorization/lib/authorization/v#{api_version}/#{HorsePower.get_singular(resource_name)}.rb" require_authfile end private def require_authfile prepend_file 'gems/authorization/lib/authorization.rb', "require \'authorization/v#{api_version}/#{HorsePower.get_singular(resource_name)}\'\n" end end end
Version data entries
15 entries across 15 versions & 1 rubygems