Class: Browser::Meta::IE

Inherits:
Base
  • Object
show all
Defined in:
lib/browser/meta/ie.rb

Instance Attribute Summary

Attributes inherited from Base

#accept_language, #ua

Instance Method Summary collapse

Methods inherited from Base

#bot, #bot?, #chrome?, #compatibility_view?, #core_media?, #device, #edge?, #firefox?, #ie?, #initialize, #known?, #micro_messenger?, #modern?, #msie_full_version, #msie_version, #nokia?, #opera?, #opera_mini?, #phantom_js?, #platform, #proxy?, #quicktime?, #safari?, #safari_webapp_mode?, #to_s, #uc_browser?, #webkit?, #webkit_full_version, #weibo?, #yandex?

Constructor Details

This class inherits a constructor from Browser::Base

Instance Method Details

#metaObject



9
10
11
12
13
14
15
16
# File 'lib/browser/meta/ie.rb', line 9

def meta
  return unless browser.ie?

  meta = []
  meta << "oldie lt-ie8 lt-ie9" if version < 8
  meta << "lt-ie9" if version == 8
  meta.join(" ")
end

#versionObject



5
6
7
# File 'lib/browser/meta/ie.rb', line 5

def version
  @version ||= browser.version.to_i
end