Class: RubyUI::Generators::Component::AllGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/ruby_ui/component/all_generator.rb

Instance Method Summary collapse

Instance Method Details

#generate_componentsObject



10
11
12
13
14
15
16
17
18
# File 'lib/generators/ruby_ui/component/all_generator.rb', line 10

def generate_components
  say "Generating all components..."

  Dir.children(self.class.source_root).each do |folder_name|
    next if folder_name.ends_with?(".rb")

    run "bin/rails generate ruby_ui:component #{folder_name} --force #{options["force"]}"
  end
end