class UserAgentParser::Device
Constants
- DEFAULT_FAMILY
Attributes
brand[R]
family[R]
model[R]
name[R]
Public Class Methods
new(family = nil, model = nil, brand = nil)
click to toggle source
# File lib/user_agent_parser/device.rb, line 11 def initialize(family = nil, model = nil, brand = nil) @family = family || DEFAULT_FAMILY @model = model || @family @brand = brand end
Public Instance Methods
eql?(other)
click to toggle source
# File lib/user_agent_parser/device.rb, line 25 def eql?(other) self.class.eql?(other.class) && family == other.family end
Also aliased as: ==
inspect()
click to toggle source
# File lib/user_agent_parser/device.rb, line 21 def inspect "#<#{self.class} #{self}>" end
to_h()
click to toggle source
# File lib/user_agent_parser/device.rb, line 31 def to_h { family: family, model: model, brand: brand } end
to_s()
click to toggle source
# File lib/user_agent_parser/device.rb, line 17 def to_s family end