Class: Spree::CursorRulesGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/spree/cursor_rules/cursor_rules_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_pathsObject



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.expand_path('templates', __dir__)
  paths.flatten
end

Instance Method Details

#copy_cursor_rulesObject



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_directoryObject



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