Class: DynamicPDFApi::ImageSize

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_client/Imaging/ImageSize.rb

Overview

Base class for image size types.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeImageSize

Initializes a new instance of the ImageSize class.



11
12
13
# File 'lib/ruby_client/Imaging/ImageSize.rb', line 11

def initialize
  @type = nil
end

Instance Attribute Details

#typeObject

Type of the image size.



6
7
8
# File 'lib/ruby_client/Imaging/ImageSize.rb', line 6

def type
  @type
end

Instance Method Details

#to_json(_options = {}) ⇒ String

Returns a JSON representation of the ImageSize object.

Returns:

  • (String)

    JSON string representing the ImageSize object.



20
21
22
23
24
# File 'lib/ruby_client/Imaging/ImageSize.rb', line 20

def to_json(_options = {})
  json_array = {}
  json_array['type'] = @type
  JSON.pretty_generate(json_array)
end