Class: Datadog::Contrib::ActiveModelSerializers::Integration

Inherits:
Object
  • Object
show all
Includes:
Integration
Defined in:
lib/ddtrace/contrib/active_model_serializers/integration.rb

Overview

Description of ActiveModelSerializers integration

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Integration

included

Class Method Details

.compatible?Boolean

Returns:

  • (Boolean)


23
24
25
26
27
# File 'lib/ddtrace/contrib/active_model_serializers/integration.rb', line 23

def self.compatible?
  super \
    && defined?(::ActiveSupport::Notifications) \
    && version >= Gem::Version.new('0.9.0')
end

.present?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/ddtrace/contrib/active_model_serializers/integration.rb', line 19

def self.present?
  super && defined?(::ActiveModel::Serializer)
end

.versionObject



14
15
16
17
# File 'lib/ddtrace/contrib/active_model_serializers/integration.rb', line 14

def self.version
  Gem.loaded_specs['active_model_serializers'] \
    && Gem.loaded_specs['active_model_serializers'].version
end

Instance Method Details

#default_configurationObject



29
30
31
# File 'lib/ddtrace/contrib/active_model_serializers/integration.rb', line 29

def default_configuration
  Configuration::Settings.new
end

#patcherObject



33
34
35
# File 'lib/ddtrace/contrib/active_model_serializers/integration.rb', line 33

def patcher
  Patcher
end