Skip to content

Commit

Permalink
Create service generator
Browse files Browse the repository at this point in the history
  • Loading branch information
hmlON committed Jul 29, 2017
1 parent 12970b6 commit 560e27f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/generators/service_generator.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# ServiceGenerator is generator for serice objects
class ServiceGenerator < Rails::Generators::NamedBase
def create_service_file
create_file "app/services/#{file_name}.rb", <<-FILE.strip_heredoc
# #{class_name}.()
class #{class_name} < ApplicationService
def perform
end
end
FILE
end
end

0 comments on commit 560e27f

Please sign in to comment.