Skip to content

This repository was made to add snippets of codes that may be interesting for me and other people, It's OK if you someone wants to add files to it that contains some certain task or something.

License

Notifications You must be signed in to change notification settings

AmrAdelKhalil/Helpers-Tasks-and-code-made-to-help

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Helpers-Tasks-and-code-made-to-help

This repository was made to add snippets of codes that may be interesting for me and other people.

#How should you deal with the repo All you have to do is include the file as it says in its description below.

What is in this repo right now?

Service.rake:

This file is made for people who are like to work with service object pattern, I noticed that I was creating files by hand which is something takes time, So with this rake you can save your time.

Steps to make it works:

1- download this file

2- include it inside lib/task for your rails project

HOW TO USE IT?

rake service:install

this gonna make directory under /app called services

rake service:create_service['<path_to_service_camel_cased_name>']

for example:

rake service:create_service['CreateUser']

this gonna create file in path app/services/create_user.rb that includes a content like this.

class CreateUser
end

another example:

rake service:create_service['admin/CreateUser']

this gonna create file in path app/services/admin/create_user.rb that includes a content like this.

module Admin
class CreateUser
end
end

About

This repository was made to add snippets of codes that may be interesting for me and other people, It's OK if you someone wants to add files to it that contains some certain task or something.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages