module Aua::Agents::MiscMobiles
Constants
- BYTEPOETS
- IOS_VERSION_PATTERN
Public Class Methods
extend?(agent)
click to toggle source
# File lib/aua-mite/agents/misc_mobiles.rb, line 3 def self.extend?(agent) BYTEPOETS.include?(agent.app) || agent.app == "MightyMiteToday" || agent.app == "MiteClocks" || agent.app == "MiteTimer" end
Public Instance Methods
app_comments()
click to toggle source
Calls superclass method
# File lib/aua-mite/agents/misc_mobiles.rb, line 51 def app_comments org = super if org && org != "" org else comments[1] end end
name()
click to toggle source
# File lib/aua-mite/agents/misc_mobiles.rb, line 21 def name BYTEPOETS.include?(app) ? :BytepoetsMite : app.to_sym end
os_name()
click to toggle source
# File lib/aua-mite/agents/misc_mobiles.rb, line 47 def os_name :iOS end
os_version()
click to toggle source
# File lib/aua-mite/agents/misc_mobiles.rb, line 37 def os_version @os_version ||= begin if app_comments[0] =~ IOS_VERSION_PATTERN || app_comments[1] =~ IOS_VERSION_PATTERN || comments[1] && comments[1][1] =~ IOS_VERSION_PATTERN $2 end end end
platform()
click to toggle source
# File lib/aua-mite/agents/misc_mobiles.rb, line 25 def platform @platform ||= begin if app_comments.first =~ /^iPod/ :iPod elsif app_comments.first =~ /^iPad/ :iPad else :iPhone end end end
type()
click to toggle source
# File lib/aua-mite/agents/misc_mobiles.rb, line 13 def type :ApiClient end
version()
click to toggle source
# File lib/aua-mite/agents/misc_mobiles.rb, line 17 def version version_of(name) || (parts[1] && parts[1][0] =~ /^[\d\.]+$/ ? parts[1][0] : nil) || version_of(app) end