Class: ServiceGenerator

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/generators/service_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject


7
8
9
# File 'lib/generators/service_generator.rb', line 7

def self.source_root
	File.join(File.dirname(__FILE__), 'templates')
end

Instance Method Details

#generateObject


12
13
14
# File 'lib/generators/service_generator.rb', line 12

def generate
	template('service.tt', "lib/inflect/services/#{name}_service.rb")
end