Sha256: 9e175f7449dd6b28964fb2a443a846c8a709ef350f3b0927af0ecedbfa647c81
Contents?: true
Size: 463 Bytes
Versions: 13
Compression:
Stored size: 463 Bytes
Contents
module Algolia class UserAgent attr_accessor :value def initialize @value = "Algolia for Ruby (#{VERSION}); Ruby (#{RUBY_VERSION})" end # Adds a segment to the UserAgent # def add(segment, version = nil) if version.nil? @value += format("; %<segment>s", segment: segment) else @value += format("; %<segment>s (%<version>s)", segment: segment, version: version) end self end end end
Version data entries
13 entries across 13 versions & 1 rubygems