class MobilappUseragent::Agent::Device

Attributes

name[R]

Public Class Methods

new(os, comments) click to toggle source
# File lib/mobilapp_useragent/agent/device.rb, line 9
def initialize(os, comments)

        @name = send("get_#{os.downcase}_device", comments)

end

Private Instance Methods

get_android_device(comments) click to toggle source
# File lib/mobilapp_useragent/agent/device.rb, line 23
def get_android_device(comments)

        comments.split(';').last.strip

end
get_ios_device(comments) click to toggle source
# File lib/mobilapp_useragent/agent/device.rb, line 17
def get_ios_device(comments)

        comments.split(';').first.strip

end