Sha256: 959042a49ec70ce71cf3ffa036e5134eb06d37a6f32ccfec0c83773241fb0db9

Contents?: true

Size: 786 Bytes

Versions: 6

Compression:

Stored size: 786 Bytes

Contents

module Aua::Agents::Others
  KNOWN_CLIENTS = %w(1PasswordThumbs 1PasswordThumbs1 Flint)

  def self.extend?(agent)
    KNOWN_CLIENTS.include?(agent.app) ||
    (agent.app == "Microsoft" && agent.products[1] == "Office") ||
    agent.products[-1] == "Word"
  end

  def type
    :Others
  end

  def name
    @name ||= begin
      if app == "Microsoft" && products[1] == "Office"
        :MSOffice
      elsif products[-1] == "Word"
        :MSWord
      elsif app == "1PasswordThumbs1"
        :"1PasswordThumbs"
      else
        app.to_sym
      end
    end
  end

  def version
    @version ||= begin
      return version_of("Word") if name == :MSWord
      return version_of("Office") if name == :MSOffice
      return "1" if app == "1PasswordThumbs1"
      super
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
aua-0.3.2 lib/aua/agents/others.rb
aua-0.3.1 lib/aua/agents/others.rb
aua-0.3.0 lib/aua/agents/others.rb
aua-0.2.6 lib/aua/agents/others.rb
aua-0.2.5 lib/aua/agents/others.rb
aua-0.2.4 lib/aua/agents/others.rb