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.



106
107
108
# File 'lib/aws-sdk-core/plugins/user_agent.rb', line 106

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.



110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# File 'lib/aws-sdk-core/plugins/user_agent.rb', line 110

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