lib/souls/cli/generate/application.rb in souls-1.4.3 vs lib/souls/cli/generate/application.rb in souls-1.4.4

- old
+ new

@@ -3,13 +3,13 @@ desc "scaffold [CLASS_NAME]", "Generate Scaffold from schema.rb" method_option :rbs, type: :boolean, aliases: "--rbs", default: false, desc: "Generates Only RBS Files" def scaffold(class_name) singularized_class_name = class_name.singularize if options[:rbs] - run_rbs_scaffold(class_name: singularized_class_name) + run_rbs_scaffold(singularized_class_name) else - run_scaffold(class_name: singularized_class_name) + run_scaffold(singularized_class_name) end true rescue Thor::Error => e raise(Thor::Error, e) end @@ -30,11 +30,11 @@ raise(Thor::Error, e) end private - def run_scaffold(class_name: "user") + def run_scaffold(class_name) type(class_name) type_rbs(class_name) query(class_name) query_rbs(class_name) mutation(class_name) @@ -52,20 +52,20 @@ rspec_query(class_name) rspec_resolver(class_name) rspec_policy(class_name) end - def run_rbs_scaffold(class_name: "user") + def run_rbs_scaffold(class_name) type_rbs(class_name) query_rbs(class_name) mutation_rbs(class_name) policy_rbs(class_name) edge_rbs(class_name) connection_rbs(class_name) resolver_rbs(class_name) end - def generated_paths(class_name: "user") + def generated_paths(class_name) singularized_class_name = class_name.singularize.underscore pluralized_class_name = class_name.pluralize.underscore [ "./app/models/#{singularized_class_name}.rb", "./app/policies/#{singularized_class_name}_policy.rb",