Skip to content

Rails gem that creates service generator in your project

License

Notifications You must be signed in to change notification settings

stphnrdmr/matas_service_generator

 
 

Repository files navigation

MatasServiceGenerator

This gem creates a Service Generator so you can use it as a part of rails generators.

Installation

Add this line to your application's Gemfile:

gem 'matas_service_generator'

And then execute:

$ bundle

Or install it yourself as:

$ gem install matas_service_generator

Usage

Use it as any standard rails generator. It has optional argument that is an array of methods you wish to generate inside your service. Also there is an optional --module option that namespaces the class.

For more help just type:

rails g service -h

Examples:

Basic service

rails g service test_service

Example

Example

Service with additional methods

rails g service test_service test_method1 test_method2

Example

Service with module name given

rails g service test_service --module test_module

Example

Example

Service with additional methods and module name

rails g service test_service method1 method2 --module test_module

Example

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/matas_service_generator. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the MatasServiceGenerator project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

About

Rails gem that creates service generator in your project

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 84.3%
  • HTML 12.1%
  • Shell 3.6%