Class: DynamicPDFApi::ImageFormat
- Inherits:
-
Object
- Object
- DynamicPDFApi::ImageFormat
- Defined in:
- lib/ruby_client/Imaging/ImageFormat.rb
Overview
Base class for image formats.
Direct Known Subclasses
BmpImageFormat, GifImageFormat, JpegImageFormat, PngImageFormat, TiffImageFormat
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Gets the image format type.
Instance Method Summary collapse
-
#initialize(type) ⇒ ImageFormat
constructor
Initializes a new instance of ImageFormat with the specified type.
-
#to_json(_options = {}) ⇒ String
Returns a JSON representation of the ImageFormat object.
Constructor Details
#initialize(type) ⇒ ImageFormat
Initializes a new instance of ImageFormat with the specified type.
16 17 18 |
# File 'lib/ruby_client/Imaging/ImageFormat.rb', line 16 def initialize(type) @type = type end |
Instance Attribute Details
#type ⇒ Object (readonly)
Gets the image format type.
9 10 11 |
# File 'lib/ruby_client/Imaging/ImageFormat.rb', line 9 def type @type end |
Instance Method Details
#to_json(_options = {}) ⇒ String
Returns a JSON representation of the ImageFormat object.
25 26 27 28 29 |
# File 'lib/ruby_client/Imaging/ImageFormat.rb', line 25 def to_json( = {}) json_array = {} json_array['type'] = @type JSON.pretty_generate(json_array) end |