Class: Google::Apis::FormsV1::MediaProperties

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

Overview

Properties of the media.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ MediaProperties

Returns a new instance of MediaProperties.



1017
1018
1019
# File 'lib/google/apis/forms_v1/classes.rb', line 1017

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

Instance Attribute Details

#alignmentString

Position of the media. Corresponds to the JSON property alignment

Returns:

  • (String)


1005
1006
1007
# File 'lib/google/apis/forms_v1/classes.rb', line 1005

def alignment
  @alignment
end

#widthFixnum

The width of the media in pixels. When the media is displayed, it is scaled to the smaller of this value or the width of the displayed form. The original aspect ratio of the media is preserved. If a width is not specified when the media is added to the form, it is set to the width of the media source. Width must be between 0 and 740, inclusive. Setting width to 0 or unspecified is only permitted when updating the media source. Corresponds to the JSON property width

Returns:

  • (Fixnum)


1015
1016
1017
# File 'lib/google/apis/forms_v1/classes.rb', line 1015

def width
  @width
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1022
1023
1024
1025
# File 'lib/google/apis/forms_v1/classes.rb', line 1022

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