Sha256: ccae0b2184ef48cbac16e96d4b9f3eb8433205543a9cd0f1dc41942db7b1e5c2

Contents?: true

Size: 490 Bytes

Versions: 23

Compression:

Stored size: 490 Bytes

Contents

module Algolia
  class UserAgent
    attr_accessor :value

    @@value = Defaults::USER_AGENT

    # Set the value of the UserAgent
    #
    def self.value
      @@value
    end

    # Resets the value of the UserAgent
    #
    def self.reset_to_default
      @@value = Defaults::USER_AGENT
    end

    # Adds a segment to the UserAgent
    #
    def self.add(segment, version)
      @@value += format('; %<segment>s (%<version>s)', segment: segment, version: version)
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
algolia-2.3.4 lib/algolia/user_agent.rb
algolia-2.3.3 lib/algolia/user_agent.rb
algolia-2.3.2 lib/algolia/user_agent.rb
algolia-2.3.1 lib/algolia/user_agent.rb
algolia-2.3.0 lib/algolia/user_agent.rb
algolia-2.2.5 lib/algolia/user_agent.rb
algolia-2.2.4 lib/algolia/user_agent.rb
algolia-2.2.3 lib/algolia/user_agent.rb
algolia-2.2.2 lib/algolia/user_agent.rb
algolia-2.2.1 lib/algolia/user_agent.rb
algolia-2.2.0 lib/algolia/user_agent.rb
algolia-2.1.1 lib/algolia/user_agent.rb
algolia-2.0.4 lib/algolia/user_agent.rb
algolia-2.0.3 lib/algolia/user_agent.rb
algolia-2.0.2 lib/algolia/user_agent.rb
algolia-2.0.1 lib/algolia/user_agent.rb
algolia-2.0.0 lib/algolia/user_agent.rb
algolia-2.0.0.pre.beta.3 lib/algolia/user_agent.rb
algolia-2.0.0.pre.beta.2 lib/algolia/user_agent.rb
algolia-2.0.0.pre.beta.1 lib/algolia/user_agent.rb