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

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

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

Returns a new instance of Rect



123
124
125
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 123

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

Instance Attribute Details

#heightFixnum

The height of the rect. Corresponds to the JSON property height

Returns:

  • (Fixnum)


106
107
108
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 106

def height
  @height
end

#leftFixnum

The left coordinate of the rect, in page coordinates. Corresponds to the JSON property left

Returns:

  • (Fixnum)


111
112
113
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 111

def left
  @left
end

#topFixnum

The top coordinate of the rect, in page coordinates. Corresponds to the JSON property top

Returns:

  • (Fixnum)


116
117
118
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 116

def top
  @top
end

#widthFixnum

The width of the rect. Corresponds to the JSON property width

Returns:

  • (Fixnum)


121
122
123
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 121

def width
  @width
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



128
129
130
131
132
133
# File 'generated/google/apis/pagespeedonline_v2/classes.rb', line 128

def update!(**args)
  @height = args[:height] if args.key?(:height)
  @left = args[:left] if args.key?(:left)
  @top = args[:top] if args.key?(:top)
  @width = args[:width] if args.key?(:width)
end