Class: Aws::Plugins::UserAgent::Handler::UserAgent Private
- Inherits:
-
Object
- Object
- Aws::Plugins::UserAgent::Handler::UserAgent
- 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
-
#initialize(context) ⇒ UserAgent
constructor
private
A new instance of UserAgent.
- #to_s ⇒ Object private
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.
71 72 73 |
# File 'lib/aws-sdk-core/plugins/user_agent.rb', line 71 def initialize(context) @context = context end |
Instance Method Details
#to_s ⇒ Object
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.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/aws-sdk-core/plugins/user_agent.rb', line 75 def to_s ua = "aws-sdk-ruby3/#{CORE_GEM_VERSION}" ua += ' ua/2.1' if (api_m = ) ua += " #{api_m}" end ua += " #{}" ua += " #{}" if (env_m = ) ua += " #{env_m}" end if (app_id_m = ) ua += " #{app_id_m}" end if (framework_m = ) ua += " #{framework_m}" end if (metric_m = ) ua += " #{metric_m}" end if @context.config.user_agent_suffix ua += " #{@context.config.user_agent_suffix}" end ua.strip end |