Class: Browser::Base
- Inherits:
-
Object
show all
- Defined in:
- lib/h2ocube_rails_helper.rb
Instance Method Summary
collapse
Instance Method Details
#desktop? ⇒ Boolean
13
14
15
|
# File 'lib/h2ocube_rails_helper.rb', line 13
def desktop?
!ua.blank? && !device.mobile? && !device.tablet?
end
|
17
18
19
20
21
22
|
# File 'lib/h2ocube_rails_helper.rb', line 17
def meta
Meta.constants.each_with_object(Set.new) do |meta_name, meta|
meta_class = Meta.const_get(meta_name)
meta.merge(meta_class.new(self).to_a)
end.to_a
end
|
#mobile? ⇒ Boolean
9
10
11
|
# File 'lib/h2ocube_rails_helper.rb', line 9
def mobile?
!ua.blank? && (device.mobile? || device.tablet?)
end
|
#wechat? ⇒ Boolean
5
6
7
|
# File 'lib/h2ocube_rails_helper.rb', line 5
def wechat?
!(ua =~ /MicroMessenger/i).nil?
end
|