fnando/browser

View on GitHub
lib/browser/duck_duck_go.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

module Browser
  class DuckDuckGo < Base
    def id
      :duckduckgo
    end

    def name
      "DuckDuckGo"
    end

    def full_version
      ua[%r{DuckDuckGo/([\d.]+)}, 1] ||
        "0.0"
    end

    def match?
      ua =~ /DuckDuckGo/
    end
  end
end