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.



77
78
79
# File 'lib/aws-sdk-core/plugins/user_agent.rb', line 77

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.



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/aws-sdk-core/plugins/user_agent.rb', line 81

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