Class: Card::Generators::SetGenerator
- Inherits:
-
NamedBase
- Object
- Rails::Generators::NamedBase
- NamedBase
- Card::Generators::SetGenerator
- Defined in:
- lib/generators/card/set/set_generator.rb
Instance Method Summary collapse
Methods included from ClassMethods
Instance Method Details
#create_files ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/generators/card/set/set_generator.rb', line 15 def create_files mod_path = if .core? File.join Cardio.gem_root, "mod", file_name else File.join "mod", file_name end set_path = File.join(mod_path, "set", set_pattern, anchors[0..-2], "#{anchors.last}.rb") spec_path = File.join(mod_path, "spec", "set", set_pattern, anchors[0..-2], "#{anchors.last}_spec.rb") template "set_template.erb", set_path template "set_spec_template.erb", spec_path end |