Sha256: 4c6628b0e72b8f775fa69432ed726feeb50e7d42227f77e5c8629d8dec8f20f0
Contents?: true
Size: 504 Bytes
Versions: 2
Compression:
Stored size: 504 Bytes
Contents
require 'generators/faat' require 'rails/generators/base' module Faat module Generators class ResourcesGenerator < Base argument :resource_name, type: :string, default: 'app', banner: 'resource_name' def create_resources template "resource_template.rb", "app/resources/#{file_name}_resources.rb" end private def file_name resource_name.underscore end def class_name resource_name.downcase.capitalize end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
faat-0.1.5 | lib/generators/faat/resources/resources_generator.rb |
faat-0.1.4 | lib/generators/faat/resources/resources_generator.rb |