Class: BoomNats::InstallGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- BoomNats::InstallGenerator
- Defined in:
- lib/generators/boom_nats/nats_generator.rb,
lib/generators/boom_nats/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#consumer ⇒ Object
17 18 19 |
# File 'lib/generators/boom_nats/nats_generator.rb', line 17 def consumer puts "asd: #{asd}" end |
#install ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/generators/boom_nats/nats_generator.rb', line 5 def install copy_file "initializer.rb", "config/initializers/boom_nats.rb" create_file "app/consumers/hello_consumer.rb", " class HelloConsumer < BoomNats::Topic\n def consume\n { message: \"Hello \\\#{params[\"name\"]}, how are you?\" }\n end\n end\n FILE\nend\n" |