Class: Charming::Generators::ComponentGenerator
- Inherits:
-
AppFileGenerator
- Object
- Base
- AppFileGenerator
- Charming::Generators::ComponentGenerator
- Defined in:
- lib/charming/generators/component_generator.rb
Overview
ComponentGenerator implements ‘charming generate component NAME`. Writes a `Charming::Presentation::Component` subclass to `app/components/<name>_component.rb`.
Instance Method Summary collapse
-
#generate ⇒ Object
Writes the component file to the standard ‘app/components` path.
Methods inherited from AppFileGenerator
Methods inherited from Base
Constructor Details
This class inherits a constructor from Charming::Generators::AppFileGenerator
Instance Method Details
#generate ⇒ Object
Writes the component file to the standard ‘app/components` path.
9 10 11 |
# File 'lib/charming/generators/component_generator.rb', line 9 def generate create_file(app_path("app", "components"), component) end |