Class: Abyme::Generators::StimulusGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/abyme/stimulus/stimulus_generator.rb

Instance Method Summary collapse

Instance Method Details

#add_to_stimulusObject



8
9
10
11
# File 'lib/generators/abyme/stimulus/stimulus_generator.rb', line 8

def add_to_stimulus
  insert_into_file(stimulus_file_path, "\nimport { AbymeController } from 'abyme';\n")
  insert_into_file(stimulus_file_path, "application.register('abyme', AbymeController);")
end