Module: GraphqlRails::Integrations
- Defined in:
- lib/graphql_rails/integrations.rb,
lib/graphql_rails/integrations/sentry.rb,
lib/graphql_rails/integrations/lograge.rb
Overview
allows to enable various integrations
Defined Under Namespace
Class Method Summary collapse
Class Method Details
.enable(*integrations) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/graphql_rails/integrations.rb', line 6 def self.enable(*integrations) @enabled_integrations ||= [] to_be_enabled_integrations = integrations.map(&:to_s) - @enabled_integrations to_be_enabled_integrations.each do |integration| require_relative "./integrations/#{integration}" Integrations.const_get(integration.classify).enable end @enabled_integrations += to_be_enabled_integrations end |