Class: EventSourceryGenerators::Generators::Reactor
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- EventSourceryGenerators::Generators::Reactor
- Includes:
- Thor::Actions
- Defined in:
- lib/event_sourcery_generators/generators/reactor.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
9 10 11 |
# File 'lib/event_sourcery_generators/generators/reactor.rb', line 9 def self.source_root File.join(File.dirname(__FILE__), 'templates/reactor') end |
Instance Method Details
#add_reactor_to_rakefile ⇒ Object
17 18 19 |
# File 'lib/event_sourcery_generators/generators/reactor.rb', line 17 def add_reactor_to_rakefile insert_into_file('Rakefile', erb_file('reactor_process.tt'), after: "processors = [\n") end |
#create_reactor ⇒ Object
13 14 15 |
# File 'lib/event_sourcery_generators/generators/reactor.rb', line 13 def create_reactor template('reactor.rb.tt', "app/reactors/#{reactor_name}.rb") end |