Class: DynamicPDFApi::ImageSize
- Inherits:
-
Object
- Object
- DynamicPDFApi::ImageSize
- Defined in:
- lib/ruby_client/Imaging/ImageSize.rb
Overview
Base class for image size types.
Direct Known Subclasses
DpiImageSize, FixedImageSize, MaxImageSize, PercentageImageSize
Instance Attribute Summary collapse
-
#type ⇒ Object
Type of the image size.
Instance Method Summary collapse
-
#initialize ⇒ ImageSize
constructor
Initializes a new instance of the ImageSize class.
-
#to_json(_options = {}) ⇒ String
Returns a JSON representation of the ImageSize object.
Constructor Details
#initialize ⇒ ImageSize
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
#type ⇒ Object
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.
20 21 22 23 24 |
# File 'lib/ruby_client/Imaging/ImageSize.rb', line 20 def to_json( = {}) json_array = {} json_array['type'] = @type JSON.pretty_generate(json_array) end |