Module: NewRelic::LanguageSupport

Extended by:
LanguageSupport
Included in:
LanguageSupport
Defined in:
lib/new_relic/language_support.rb

Defined Under Namespace

Modules: Control, DataSerialization, SynchronizedHash

Instance Method Summary collapse

Instance Method Details

#using_engine?(engine) ⇒ Boolean

Returns:

  • (Boolean)


61
62
63
64
65
66
67
# File 'lib/new_relic/language_support.rb', line 61

def using_engine?(engine)
  if defined?(::RUBY_ENGINE)
    ::RUBY_ENGINE == engine
  else
    engine == 'ruby'
  end
end

#using_version?(version) ⇒ Boolean

Returns:

  • (Boolean)


69
70
71
72
# File 'lib/new_relic/language_support.rb', line 69

def using_version?(version)
  numbers = version.split('.')
  numbers == ::RUBY_VERSION.split('.')[0, numbers.size]
end