Skip to content
Rails gem that creates service generator in your project
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
docs/images
lib
.gitignore
CODE_OF_CONDUCT.md
Gemfile
LICENSE.txt
README.md
Rakefile
matas_service_generator.gemspec

README.md

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.

You can’t perform that action at this time.