Sha256: af68fe5b3dad2a198e908bd71658879fc568421fb3c4a678fe8ca610e658f4b3

Contents?: true

Size: 643 Bytes

Versions: 16

Compression:

Stored size: 643 Bytes

Contents

module Rollbar
  module LanguageSupport
    extend self

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

    def const_get(mod, target, inherit = true)
      if ruby_18?
        mod.const_get(target)
      else
        mod.const_get(target, inherit)
      end
    end

    def can_scrub_url?
      !version?('1.8')
    end

    def ruby_18?
      version?('1.8')
    end

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

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

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
rollbar-2.10.0 lib/rollbar/language_support.rb
rollbar-2.9.1 lib/rollbar/language_support.rb
rollbar-2.9.0 lib/rollbar/language_support.rb
rollbar-2.8.3 lib/rollbar/language_support.rb
rollbar-2.8.2 lib/rollbar/language_support.rb
rollbar-2.8.1 lib/rollbar/language_support.rb
rollbar-2.8.0 lib/rollbar/language_support.rb
rollbar-2.7.1 lib/rollbar/language_support.rb
rollbar-2.7.0 lib/rollbar/language_support.rb
rollbar-2.6.3 lib/rollbar/language_support.rb
rollbar-2.6.2 lib/rollbar/language_support.rb
rollbar-2.6.1 lib/rollbar/language_support.rb
rollbar-2.6.0 lib/rollbar/language_support.rb
rollbar-2.5.2 lib/rollbar/language_support.rb
rollbar-2.5.1 lib/rollbar/language_support.rb
rollbar-2.5.0 lib/rollbar/language_support.rb