Class: Google::Apis::PagespeedonlineV5::Environment
- Inherits:
-
Object
- Object
- Google::Apis::PagespeedonlineV5::Environment
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/pagespeedonline_v5/classes.rb,
lib/google/apis/pagespeedonline_v5/representations.rb,
lib/google/apis/pagespeedonline_v5/representations.rb
Overview
Message containing environment configuration for a Lighthouse run.
Instance Attribute Summary collapse
-
#benchmark_index ⇒ Float
The benchmark index number that indicates rough device class.
-
#host_user_agent ⇒ String
The user agent string of the version of Chrome used.
-
#network_user_agent ⇒ String
The user agent string that was sent over the network.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Environment
constructor
A new instance of Environment.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Environment
Returns a new instance of Environment.
233 234 235 |
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 233 def initialize(**args) update!(**args) end |
Instance Attribute Details
#benchmark_index ⇒ Float
The benchmark index number that indicates rough device class.
Corresponds to the JSON property benchmarkIndex
221 222 223 |
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 221 def benchmark_index @benchmark_index end |
#host_user_agent ⇒ String
The user agent string of the version of Chrome used.
Corresponds to the JSON property hostUserAgent
226 227 228 |
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 226 def host_user_agent @host_user_agent end |
#network_user_agent ⇒ String
The user agent string that was sent over the network.
Corresponds to the JSON property networkUserAgent
231 232 233 |
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 231 def network_user_agent @network_user_agent end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
238 239 240 241 242 |
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 238 def update!(**args) @benchmark_index = args[:benchmark_index] if args.key?(:benchmark_index) @host_user_agent = args[:host_user_agent] if args.key?(:host_user_agent) @network_user_agent = args[:network_user_agent] if args.key?(:network_user_agent) end |