Class: Google::Apis::PagespeedonlineV5::AuditRefs
- Inherits:
-
Object
- Object
- Google::Apis::PagespeedonlineV5::AuditRefs
- 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
A light reference to an audit by id, used to group and weight audits in a given category.
Instance Attribute Summary collapse
-
#acronym ⇒ String
The conventional acronym for the audit/metric.
-
#group ⇒ String
The category group that the audit belongs to (optional).
-
#id ⇒ String
The audit ref id.
-
#relevant_audits ⇒ Array<String>
Any audit IDs closely relevant to this one.
-
#weight ⇒ Float
The weight this audit's score has on the overall category score.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AuditRefs
constructor
A new instance of AuditRefs.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ AuditRefs
Returns a new instance of AuditRefs.
55 56 57 |
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 55 def initialize(**args) update!(**args) end |
Instance Attribute Details
#acronym ⇒ String
The conventional acronym for the audit/metric.
Corresponds to the JSON property acronym
33 34 35 |
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 33 def acronym @acronym end |
#group ⇒ String
The category group that the audit belongs to (optional).
Corresponds to the JSON property group
38 39 40 |
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 38 def group @group end |
#id ⇒ String
The audit ref id.
Corresponds to the JSON property id
43 44 45 |
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 43 def id @id end |
#relevant_audits ⇒ Array<String>
Any audit IDs closely relevant to this one.
Corresponds to the JSON property relevantAudits
48 49 50 |
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 48 def relevant_audits @relevant_audits end |
#weight ⇒ Float
The weight this audit's score has on the overall category score.
Corresponds to the JSON property weight
53 54 55 |
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 53 def weight @weight end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
60 61 62 63 64 65 66 |
# File 'lib/google/apis/pagespeedonline_v5/classes.rb', line 60 def update!(**args) @acronym = args[:acronym] if args.key?(:acronym) @group = args[:group] if args.key?(:group) @id = args[:id] if args.key?(:id) @relevant_audits = args[:relevant_audits] if args.key?(:relevant_audits) @weight = args[:weight] if args.key?(:weight) end |