Sha256: 6478fdcd44de6c61c63447b307b03e7c223427faaefa3dbe5138929808105caa

Contents?: true

Size: 351 Bytes

Versions: 4

Compression:

Stored size: 351 Bytes

Contents

module Querifier
  module Generators
    class QueryGenerator < ::Rails::Generators::NamedBase
      source_root File.expand_path('../templates', __FILE__)
      desc 'Creates Querifier query for your application'

      def create_service
        template 'query.rb.erb', "app/queries/#{plural_name.singularize}_query.rb"
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
querifier-0.2.3 lib/generators/querifier/query_generator.rb
querifier-0.2.2 lib/generators/querifier/query_generator.rb
querifier-0.1.1 lib/generators/querifier/query_generator.rb
querifier-0.1.0 lib/generators/querifier/query_generator.rb