Sha256: 050f5a24ec6d9b4c3a69c21edb442d2613217c6e95799c678037b18d42425dce
Contents?: true
Size: 493 Bytes
Versions: 3
Compression:
Stored size: 493 Bytes
Contents
require 'generators/faat' require 'rails/generators/base' module Faat module Generators class ServicesGenerator < Base argument :service_name, type: :string, default: 'app', banner: 'service_name' def create_service template "service_template.rb", "app/services/#{file_name}_service.rb" end private def file_name service_name.underscore end def class_name service_name.downcase.capitalize end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
faat-0.1.7 | lib/generators/faat/services/services_generator.rb |
faat-0.1.6 | lib/generators/faat/services/services_generator.rb |
faat-0.1.5 | lib/generators/faat/services/services_generator.rb |