Class: Webhookr::Stripe::Generators::InitGenerator

Inherits:
Generators::InitGenerator
  • Object
show all
Defined in:
lib/generators/webhookr/stripe/init_generator.rb

Instance Method Summary collapse

Instance Method Details

#initObject



9
10
11
12
13
14
# File 'lib/generators/webhookr/stripe/init_generator.rb', line 9

def init
  super
  append_to_file "config/initializers/#{file_name}.rb" do
    plugin_initializer_text
  end
end

#plugin_initializer_textObject



16
17
18
19
20
# File 'lib/generators/webhookr/stripe/init_generator.rb', line 16

def plugin_initializer_text
  "\nWebhookr::Stripe::Adapter.config.security_token = '#{generate_security_token}'" +
  "\n# Uncomment the next line to include your custom Stripe handler\n" +
  "# <-- Webhookr::Stripe::Adapter.config.callback = your_custom_class --> \n"
end