Module: Browser::Meta

Defined in:
lib/browser/meta/id.rb,
lib/browser/meta/ie.rb,
lib/browser/meta/ios.rb,
lib/browser/meta/base.rb,
lib/browser/meta/proxy.rb,
lib/browser/meta/device.rb,
lib/browser/meta/mobile.rb,
lib/browser/meta/safari.rb,
lib/browser/meta/tablet.rb,
lib/browser/meta/webkit.rb,
lib/browser/meta/platform.rb,
lib/browser/meta/generic_browser.rb

Defined Under Namespace

Classes: Base, Device, GenericBrowser, IE, IOS, Id, Mobile, Platform, Proxy, Safari, Tablet, Webkit

Class Method Summary collapse

Class Method Details

.get(browser) ⇒ Object



21
22
23
24
25
# File 'lib/browser/meta/base.rb', line 21

def self.get(browser)
  rules.each_with_object(Set.new) do |rule, meta|
    meta.merge(rule.new(browser).to_a)
  end.to_a
end

.rulesObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/browser/meta/base.rb', line 5

def self.rules
  @rules ||= [
    Device,
    GenericBrowser,
    Id,
    IE,
    IOS,
    Mobile,
    Platform,
    Proxy,
    Safari,
    Tablet,
    Webkit
  ]
end