Class: Service::Generators::QueryGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/service/query/query_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_queriesObject



11
12
13
14
15
16
17
18
# File 'lib/generators/service/query/query_generator.rb', line 11

def create_queries
  queries.each do |m|
    @query = m.classify

    path = "#{service_path}/queries/#{m.underscore}.rb"
    template 'query.rb.erb', path
  end
end