Class: Rails::Generators::ClaptonGenerator
- Inherits:
-
NamedBase
- Object
- NamedBase
- Rails::Generators::ClaptonGenerator
- Defined in:
- lib/rails/generators/clapton_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_component_file ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/rails/generators/clapton_generator.rb', line 6 def create_component_file create_file "app/components/#{file_name}_component.rb" do <<~RUBY class #{class_name}Component < Clapton::Component def render end end RUBY end create_file "app/states/#{file_name}_state.rb" do <<~RUBY class #{class_name}State < Clapton::State end RUBY end end |