Class: Google::Apis::PagespeedonlineV5::Environment

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Environment

Returns a new instance of Environment.



238
239
240
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 238

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#benchmark_indexFloat

The benchmark index number that indicates rough device class. Corresponds to the JSON property benchmarkIndex

Returns:

  • (Float)


221
222
223
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 221

def benchmark_index
  @benchmark_index
end

#creditsHash<String,String>

The version of libraries with which these results were generated. Ex: axe-core. Corresponds to the JSON property credits

Returns:

  • (Hash<String,String>)


226
227
228
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 226

def credits
  @credits
end

#host_user_agentString

The user agent string of the version of Chrome used. Corresponds to the JSON property hostUserAgent

Returns:

  • (String)


231
232
233
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 231

def host_user_agent
  @host_user_agent
end

#network_user_agentString

The user agent string that was sent over the network. Corresponds to the JSON property networkUserAgent

Returns:

  • (String)


236
237
238
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 236

def network_user_agent
  @network_user_agent
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



243
244
245
246
247
248
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 243

def update!(**args)
  @benchmark_index = args[:benchmark_index] if args.key?(:benchmark_index)
  @credits = args[:credits] if args.key?(:credits)
  @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