Sha256: 2db335dfa4e76cc49b0843184941718e5da5c784e10f265b214835e6d6a4b1e2

Contents?: true

Size: 432 Bytes

Versions: 6

Compression:

Stored size: 432 Bytes

Contents

module UserAgentParser

  class OperatingSystem
  
    attr_accessor :name, :version
  
    def initialize(name="Other", version=nil)
      self.name = name
      self.version = version
    end
  
    def to_s
      s = name
      s += " #{version}" if version
      s
    end
  
    def inspect
      "#<#{self.class} #{to_s}>"
    end
  
    def ==(other)
      name == other.name && version == other.version
    end
  
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
user_agent_parser-1.0.2 lib/user_agent_parser/operating_system.rb
user_agent_parser-1.0.1 lib/user_agent_parser/operating_system.rb
user_agent_parser-1.0.0 lib/user_agent_parser/operating_system.rb
user_agent_parser-0.1.2 lib/user_agent_parser/operating_system.rb
user_agent_parser-0.1.1 lib/user_agent_parser/operating_system.rb
user_agent_parser-0.1.0 lib/user_agent_parser/operating_system.rb