Sha256: aaea3a5662098f19212d30b7b2f6c9dc113f4fab08345ad179651e52bff49ebc

Contents?: true

Size: 553 Bytes

Versions: 14

Compression:

Stored size: 553 Bytes

Contents

module Rollbar
  module LanguageSupport
    module_function

    def const_defined?(mod, target, inherit = true)
      mod.const_defined?(target, inherit)
    end

    def const_get(mod, target, inherit = true)
      mod.const_get(target, inherit)
    end

    def ruby_19?
      version?('1.9')
    end

    def version?(version)
      numbers = version.split('.')

      numbers == ::RUBY_VERSION.split('.')[0, numbers.size]
    end

    def timeout_exceptions
      return [] if ruby_19?

      [Net::ReadTimeout, Net::OpenTimeout]
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rollbar-2.27.1 lib/rollbar/language_support.rb
rollbar-2.27.0 lib/rollbar/language_support.rb
rollbar-2.26.1 lib/rollbar/language_support.rb
rollbar-2.26.0 lib/rollbar/language_support.rb
rollbar-2.25.1 lib/rollbar/language_support.rb
rollbar-2.25.0 lib/rollbar/language_support.rb
rollbar-2.24.0 lib/rollbar/language_support.rb
rollbar-2.23.2 lib/rollbar/language_support.rb
rollbar-2.23.1 lib/rollbar/language_support.rb
rollbar-2.23.0 lib/rollbar/language_support.rb
rollbar-2.22.1 lib/rollbar/language_support.rb
rollbar-2.22.0 lib/rollbar/language_support.rb
rollbar-2.21.0 lib/rollbar/language_support.rb
rollbar-2.20.2 lib/rollbar/language_support.rb