Class: Google::Apis::PagespeedonlineV4::PagespeedApiImageV4::PageRect

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/pagespeedonline_v4/classes.rb,
generated/google/apis/pagespeedonline_v4/representations.rb,
generated/google/apis/pagespeedonline_v4/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) ⇒ PageRect

Returns a new instance of PageRect



248
249
250
# File 'generated/google/apis/pagespeedonline_v4/classes.rb', line 248

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

Instance Attribute Details

#heightFixnum

Corresponds to the JSON property height

Returns:

  • (Fixnum)


231
232
233
# File 'generated/google/apis/pagespeedonline_v4/classes.rb', line 231

def height
  @height
end

#leftFixnum

Corresponds to the JSON property left

Returns:

  • (Fixnum)


236
237
238
# File 'generated/google/apis/pagespeedonline_v4/classes.rb', line 236

def left
  @left
end

#topFixnum

Corresponds to the JSON property top

Returns:

  • (Fixnum)


241
242
243
# File 'generated/google/apis/pagespeedonline_v4/classes.rb', line 241

def top
  @top
end

#widthFixnum

Corresponds to the JSON property width

Returns:

  • (Fixnum)


246
247
248
# File 'generated/google/apis/pagespeedonline_v4/classes.rb', line 246

def width
  @width
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



253
254
255
256
257
258
# File 'generated/google/apis/pagespeedonline_v4/classes.rb', line 253

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