Class: Servus::Generators::EventGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Servus::Generators::EventGenerator
- Defined in:
- lib/generators/servus/event/event_generator.rb
Overview
Rails generator for creating Servus event classes.
Generates an event class and spec file. The event name is inferred from the class name — no explicit event_name call needed.
Instance Method Summary collapse
-
#create_event_file ⇒ void
Creates the event class and spec files.
Instance Method Details
#create_event_file ⇒ void
This method returns an undefined value.
Creates the event class and spec files.
28 29 30 31 |
# File 'lib/generators/servus/event/event_generator.rb', line 28 def create_event_file template 'event.rb.erb', event_path template 'event_spec.rb.erb', event_spec_path end |