Class: Aws::Plugins::UserAgent::Handler::UserAgent Private

Inherits:
Object
  • Object
show all
Defined in:
lib/aws-sdk-core/plugins/user_agent.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ UserAgent

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of UserAgent.



45
46
47
# File 'lib/aws-sdk-core/plugins/user_agent.rb', line 45

def initialize(context)
  @context = context
end

Instance Method Details

#to_sObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/aws-sdk-core/plugins/user_agent.rb', line 49

def to_s
  ua = "aws-sdk-ruby3/#{CORE_GEM_VERSION}"
  ua += ' ua/2.0'
  ua += " #{}" if 
  ua += " #{}"
  ua += " #{}"
  ua += " #{}" if 
  ua += " #{}" if 
  ua += " #{app_id}" if app_id
  ua += " #{}" if 
  ua += " #{}" if 
  if @context.config.user_agent_suffix
    ua += " #{@context.config.user_agent_suffix}"
  end
  ua.strip
end