Class: Google::Apis::PagespeedonlineV2::Result::FormattedResults::RuleResult

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/pagespeedonline_v2/classes.rb,
generated/google/apis/pagespeedonline_v2/representations.rb,
generated/google/apis/pagespeedonline_v2/representations.rb

Overview

The enum-like identifier for this rule. For instance "EnableKeepAlive" or " AvoidCssImport". Not localized.

Defined Under Namespace

Classes: UrlBlock

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ RuleResult

Returns a new instance of RuleResult



412
413
414
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 412

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

Instance Attribute Details

#groupsArray<String>

List of rule groups that this rule belongs to. Each entry in the list is one of "SPEED" or "USABILITY". Corresponds to the JSON property groups

Returns:

  • (Array<String>)


382
383
384
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 382

def groups
  @groups
end

#localized_rule_nameString

Localized name of the rule, intended for presentation to a user. Corresponds to the JSON property localizedRuleName

Returns:

  • (String)


387
388
389
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 387

def localized_rule_name
  @localized_rule_name
end

#rule_impactFloat

The impact (unbounded floating point value) that implementing the suggestions for this rule would have on making the page faster. Impact is comparable between rules to determine which rule's suggestions would have a higher or lower impact on making a page faster. For instance, if enabling compression would save 1MB, while optimizing images would save 500kB, the enable compression rule would have 2x the impact of the image optimization rule, all other things being equal. Corresponds to the JSON property ruleImpact

Returns:

  • (Float)


398
399
400
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 398

def rule_impact
  @rule_impact
end

#summaryGoogle::Apis::PagespeedonlineV2::FormatString

A brief summary description for the rule, indicating at a high level what should be done to follow the rule and what benefit can be gained by doing so. Corresponds to the JSON property summary



404
405
406
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 404

def summary
  @summary
end

#url_blocksArray<Google::Apis::PagespeedonlineV2::Result::FormattedResults::RuleResult::UrlBlock>

List of blocks of URLs. Each block may contain a heading and a list of URLs. Each URL may optionally include additional details. Corresponds to the JSON property urlBlocks



410
411
412
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 410

def url_blocks
  @url_blocks
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



417
418
419
420
421
422
423
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 417

def update!(**args)
  @groups = args[:groups] if args.key?(:groups)
  @localized_rule_name = args[:localized_rule_name] if args.key?(:localized_rule_name)
  @rule_impact = args[:rule_impact] if args.key?(:rule_impact)
  @summary = args[:summary] if args.key?(:summary)
  @url_blocks = args[:url_blocks] if args.key?(:url_blocks)
end