class Hoss::Transport::UserAgent

@api private

Public Class Methods

new(config) click to toggle source
# File lib/hoss/transport/user_agent.rb, line 24
def initialize(config)
  @built = build(config)
end

Public Instance Methods

to_s() click to toggle source
# File lib/hoss/transport/user_agent.rb, line 28
def to_s
  @built
end

Private Instance Methods

build(config) click to toggle source
# File lib/hoss/transport/user_agent.rb, line 34
def build(config)
  metadata = Metadata.new(config)

  [
    "hoss-ruby/#{VERSION}",
    HTTP::Request::USER_AGENT,
    [
      metadata.service.runtime.name,
      metadata.service.runtime.version
    ].join('/')
  ].join(' ')
end