Class: Plok::Search::ClassGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Plok::Search::ClassGenerator
- Defined in:
- lib/generators/plok/search/class_generator.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/generators/plok/search/class_generator.rb', line 7 def create copy_file "namespace_class.rb", namespace_class_path copy_file "namespace_class_spec.rb", namespace_class_spec_path gsub_file(namespace_class_path, '[namespace]', namespace_class) gsub_file(namespace_class_spec_path, '[namespace]', namespace_class) gsub_file(namespace_class_spec_path, '[snakecased_namespace]', .namespace) end |