Class: Shaf::Generator::Model
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
identified_by, identifier, #identifier, inherited, #initialize, usage
Constructor Details
This class inherits a constructor from Shaf::Generator::Base
Class Method Details
.options(parser, options) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/shaf/generator/model.rb', line 8 def self.(parser, ) parser.on("--skip-model", "don't generate model or migration") do |s| [:skip_model] = s end parser.on("--skip-migration", "don't generate a migration") do |s| [:skip_migration] = s end end |
Instance Method Details
#call ⇒ Object
18 19 20 21 22 23 |
# File 'lib/shaf/generator/model.rb', line 18 def call create_model unless skip_model? create_migration unless skip_migration? create_serializer create_forms end |