Class: Spree::CursorRulesGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Spree::CursorRulesGenerator
- Defined in:
- lib/generators/spree/cursor_rules/cursor_rules_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_paths ⇒ Object
5 6 7 8 9 |
# File 'lib/generators/spree/cursor_rules/cursor_rules_generator.rb', line 5 def self.source_paths paths = superclass.source_paths paths << File.('templates', __dir__) paths.flatten end |
Instance Method Details
#copy_cursor_rules ⇒ Object
15 16 17 |
# File 'lib/generators/spree/cursor_rules/cursor_rules_generator.rb', line 15 def copy_cursor_rules copy_file 'spree_rules.mdc', '.cursor/rules/spree_rules.mdc' end |
#create_cursor_rules_directory ⇒ Object
11 12 13 |
# File 'lib/generators/spree/cursor_rules/cursor_rules_generator.rb', line 11 def create_cursor_rules_directory empty_directory '.cursor/rules' end |