Sha256: 94dd9e50fb52ddc95a8bb313205dc174b6dfd1030b18ffb1b4ccf43c6bed2d7b
Contents?: true
Size: 960 Bytes
Versions: 1
Compression:
Stored size: 960 Bytes
Contents
module Riveter module Generators class EnquiryGenerator < ::Rails::Generators::NamedBase source_root File.expand_path('../templates', __FILE__) class_option :enquiry_controller, :type => :boolean, :default => true hook_for :enquiry_controller, :type => :boolean class_option :query, :type => :boolean, :default => true hook_for :query, :type => :boolean class_option :query_filter, :type => :boolean, :default => true hook_for :query_filter, :type => :boolean check_class_collision :suffix => 'Enquiry' def create_enquiry_file template 'enquiry.rb', File.join('app/enquiries', class_path, "#{file_name}_enquiry.rb") end def create_module_file return if regular_class_path.empty? template 'module.rb', File.join('app/enquiries', "#{class_path.join('/')}.rb") if behavior == :invoke end hook_for :test_framework, :as => :enquiry end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
riveter-0.0.1 | lib/generators/riveter/enquiry/enquiry_generator.rb |