Class: Motion::Generators::ComponentGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Motion::Generators::ComponentGenerator
- Defined in:
- lib/generators/motion/component_generator.rb
Instance Method Summary collapse
Instance Method Details
#generate_component ⇒ Object
12 13 14 |
# File 'lib/generators/motion/component_generator.rb', line 12 def generate_component generate "component", class_name, *attributes.map(&:name) end |
#include_motion ⇒ Object
16 17 18 19 20 |
# File 'lib/generators/motion/component_generator.rb', line 16 def include_motion inject_into_class component_path, "#{class_name}Component" do " include Motion::Component\n\n" end end |