Class: Google::Apis::PagespeedonlineV2::FormatString::Arg

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

Defined Under Namespace

Classes: Rect, SecondaryRect

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) ⇒ Arg

Returns a new instance of Arg



86
87
88
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 86

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

Instance Attribute Details

#keyString

The placeholder key for this arg, as a string. Corresponds to the JSON property key

Returns:

  • (String)


59
60
61
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 59

def key
  @key
end

#rectsArray<Google::Apis::PagespeedonlineV2::FormatString::Arg::Rect>

The screen rectangles being referred to, with dimensions measured in CSS pixels. This is only ever used for SNAPSHOT_RECT arguments. If this is absent for a SNAPSHOT_RECT argument, it means that that argument refers to the entire snapshot. Corresponds to the JSON property rects



67
68
69
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 67

def rects
  @rects
end

#secondary_rectsArray<Google::Apis::PagespeedonlineV2::FormatString::Arg::SecondaryRect>

Secondary screen rectangles being referred to, with dimensions measured in CSS pixels. This is only ever used for SNAPSHOT_RECT arguments. Corresponds to the JSON property secondary_rects



73
74
75
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 73

def secondary_rects
  @secondary_rects
end

#typeString

Type of argument. One of URL, STRING_LITERAL, INT_LITERAL, BYTES, DURATION, VERBATIM_STRING, PERCENTAGE, HYPERLINK, or SNAPSHOT_RECT. Corresponds to the JSON property type

Returns:

  • (String)


79
80
81
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 79

def type
  @type
end

#valueString

Argument value, as a localized string. Corresponds to the JSON property value

Returns:

  • (String)


84
85
86
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 84

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



91
92
93
94
95
96
97
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 91

def update!(**args)
  @key = args[:key] if args.key?(:key)
  @rects = args[:rects] if args.key?(:rects)
  @secondary_rects = args[:secondary_rects] if args.key?(:secondary_rects)
  @type = args[:type] if args.key?(:type)
  @value = args[:value] if args.key?(:value)
end