Class: Nyanko::Generators::UnitGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Nyanko::Generators::UnitGenerator
- Defined in:
- lib/generators/nyanko/unit/unit_generator.rb
Constant Summary collapse
- ASSETS_TYPES =
%w[images javascripts stylesheets]
Instance Method Summary collapse
Instance Method Details
#create_unit_directory ⇒ Object
8 9 10 |
# File 'lib/generators/nyanko/unit/unit_generator.rb', line 8 def create_unit_directory empty_directory(directory) end |
#create_unit_file ⇒ Object
12 13 14 |
# File 'lib/generators/nyanko/unit/unit_generator.rb', line 12 def create_unit_file template("unit.rb.erb", "#{directory}/#{file_name}.rb") end |
#create_views_directory ⇒ Object
16 17 18 |
# File 'lib/generators/nyanko/unit/unit_generator.rb', line 16 def create_views_directory create_file("#{directory}/views/.gitkeep", "") end |