Class: UserAgent::Browsers::AppleCoreMedia
- Inherits:
-
Base
- Object
- Array
- Base
- UserAgent::Browsers::AppleCoreMedia
show all
- Defined in:
- lib/user_agent/browsers/apple_core_media.rb
Overview
CoreMedia is a framework on iOS and is used by various iOS apps to playback media.
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#<=>, #bot?, #eql?, #method_missing, #mobile?, #respond_to?, #to_h, #to_s, #to_str, #version
Methods included from Comparable
#<, #<=, #==, #>, #>=
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class UserAgent::Browsers::Base
Class Method Details
.extend?(agent) ⇒ Boolean
5
6
7
|
# File 'lib/user_agent/browsers/apple_core_media.rb', line 5
def self.extend?(agent)
agent.detect { |useragent| useragent.product == 'AppleCoreMedia' }
end
|
Instance Method Details
#application ⇒ Object
13
14
15
|
# File 'lib/user_agent/browsers/apple_core_media.rb', line 13
def application
self.reject { |agent| agent..nil? || agent..empty? }.first
end
|
#browser ⇒ Object
9
10
11
|
# File 'lib/user_agent/browsers/apple_core_media.rb', line 9
def browser
"AppleCoreMedia"
end
|
#localization ⇒ Object
45
46
47
48
49
|
# File 'lib/user_agent/browsers/apple_core_media.rb', line 45
def localization
return unless application
application.[3]
end
|
17
18
19
20
21
22
23
24
25
|
# File 'lib/user_agent/browsers/apple_core_media.rb', line 17
def platform
return unless application
if application.[0] =~ /Windows/
'Windows'
else
application.[0]
end
end
|
#security ⇒ Object
27
28
29
|
# File 'lib/user_agent/browsers/apple_core_media.rb', line 27
def security
Security[application.[1]]
end
|