Class: Cloudenvoy::Generators::SubscriberGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/cloudenvoy/subscriber_generator.rb

Overview

:nodoc:

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.default_generator_rootObject



12
13
14
# File 'lib/generators/cloudenvoy/subscriber_generator.rb', line 12

def self.default_generator_root
  File.dirname(__FILE__)
end

Instance Method Details

#create_subscriber_fileObject



16
17
18
# File 'lib/generators/cloudenvoy/subscriber_generator.rb', line 16

def create_subscriber_file
  template 'subscriber.rb.erb', File.join('app/subscribers', class_path, "#{file_name}_subscriber.rb")
end

#create_test_fileObject



20
21
22
23
24
# File 'lib/generators/cloudenvoy/subscriber_generator.rb', line 20

def create_test_file
  return unless test_framework

  create_subscriber_spec if test_framework == :rspec
end