Module: Humpyard::Generators::ModelTemplate
- Included in:
- AuthGenerator, ElementGenerator, PageGenerator
- Defined in:
- lib/generators/humpyard.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
-
.included(base) ⇒ Object
:nodoc:.
Class Method Details
.included(base) ⇒ Object
:nodoc:
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/generators/humpyard.rb', line 20 def self.included(base) #:nodoc: base.extend ClassMethods base.argument :model_attributes, :type => :array, :default => [], :banner => 'field:type field:type' base.class_option :skip_model, :desc => 'Don\'t generate a model or migration file.', :type => :boolean base.class_option :skip_migration, :desc => 'Dont generate migration file for model.', :type => :boolean base.class_option :skip_timestamps, :desc => 'Don\'t add timestamps to migration file.', :type => :boolean base.class_option :skip_views, :desc => 'Don\'t generate view files.', :type => :boolean base.class_option :skip_tests, :desc => 'Don\'t generate test files.', :group => 'Test framework', :type => :boolean base.class_option :test_unit, :desc => 'Use test/unit for test files.', :group => 'Test framework', :type => :boolean base.class_option :rspec, :desc => 'Use RSpec for test files.', :group => 'Test framework', :type => :boolean base.class_option :shoulda, :desc => 'Use shoulda for test files.', :group => 'Test framework', :type => :boolean end |