Module: Operations::Base::Generators::BaseGenerator
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/operations/base/generators/base_generator.rb
Instance Method Summary collapse
Instance Method Details
#generate_files ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/operations/base/generators/base_generator.rb', line 35 def generate_files @root_file_path = "app" @root_file_path = "components/#{[:component]}" if [:component] @root_test_file_path = "test" @root_test_file_path = "test/components/#{[:component]}" if [:component] end |
#initialize(args, *options) ⇒ Object
13 14 15 16 17 |
# File 'lib/operations/base/generators/base_generator.rb', line 13 def initialize(args, *) super parse_fields! end |
#validate_verb_argument ⇒ Object
29 30 31 32 33 |
# File 'lib/operations/base/generators/base_generator.rb', line 29 def validate_verb_argument return if %w[create update destroy].include?(verb) raise Thor::Error, "Invalid verb: '#{verb}'. It should be either 'create', 'update' or 'destroy'." end |