Class: TXTextControl::ReportingCloud::MergeSettings
- Inherits:
-
DocumentSettings
- Object
- DocumentSettings
- TXTextControl::ReportingCloud::MergeSettings
- Defined in:
- lib/txtextcontrol/reportingcloud/merge_settings.rb
Overview
Holds the merge settings needed by the merge method.
Instance Attribute Summary collapse
-
#merge_html ⇒ Boolean
(also: #merge_html?)
Specifies whether field data can contain formatted Html content or not.
-
#remove_empty_blocks ⇒ Boolean
(also: #remove_empty_blocks?)
Specifies whether the content of empty merge blocks should be removed from the template or not.
-
#remove_empty_fields ⇒ Boolean
(also: #remove_empty_fields?)
Specifies whether empty fields should be removed from the template or not.
-
#remove_empty_images ⇒ Boolean
(also: #remove_empty_images?)
Specifies whether images which don't have merge data should be removed from the template or not.
-
#remove_trailing_whitespace ⇒ Boolean
(also: #remove_trailing_whitespace?)
Specifies whether trailing whitespace should be removed before saving a document.
Attributes inherited from DocumentSettings
#author, #creation_date, #creator_application, #document_subject, #document_title, #last_modification_date, #user_password
Instance Method Summary collapse
-
#initialize ⇒ MergeSettings
constructor
A new instance of MergeSettings.
-
#to_camelized_hash ⇒ Hash
Converts a MergeSettings instance to a hash while converting the attribute names from snake case to camel case.
Constructor Details
#initialize ⇒ MergeSettings
Returns a new instance of MergeSettings
46 47 48 49 50 51 52 |
# File 'lib/txtextcontrol/reportingcloud/merge_settings.rb', line 46 def initialize @remove_empty_fields = true @remove_empty_blocks = true @remove_empty_images = true @remove_trailing_whitespace = true @merge_html = false end |
Instance Attribute Details
#merge_html ⇒ Boolean Also known as: merge_html?
Specifies whether field data can contain formatted Html content or not. The default value is false. Html content must be enclosed in an <html /> tag element. Only active in the Merge endpoint.
33 34 35 |
# File 'lib/txtextcontrol/reportingcloud/merge_settings.rb', line 33 def merge_html @merge_html end |
#remove_empty_blocks ⇒ Boolean Also known as: remove_empty_blocks?
Specifies whether the content of empty merge blocks should be removed from the template or not.
33 34 35 |
# File 'lib/txtextcontrol/reportingcloud/merge_settings.rb', line 33 def remove_empty_blocks @remove_empty_blocks end |
#remove_empty_fields ⇒ Boolean Also known as: remove_empty_fields?
Specifies whether empty fields should be removed from the template or not.
33 34 35 |
# File 'lib/txtextcontrol/reportingcloud/merge_settings.rb', line 33 def remove_empty_fields @remove_empty_fields end |
#remove_empty_images ⇒ Boolean Also known as: remove_empty_images?
Specifies whether images which don't have merge data should be removed from the template or not.
33 34 35 |
# File 'lib/txtextcontrol/reportingcloud/merge_settings.rb', line 33 def remove_empty_images @remove_empty_images end |
#remove_trailing_whitespace ⇒ Boolean Also known as: remove_trailing_whitespace?
Specifies whether trailing whitespace should be removed before saving a document.
33 34 35 |
# File 'lib/txtextcontrol/reportingcloud/merge_settings.rb', line 33 def remove_trailing_whitespace @remove_trailing_whitespace end |
Instance Method Details
#to_camelized_hash ⇒ Hash
Converts a MergeSettings instance to a hash while converting the attribute names from snake case to camel case.
57 58 59 60 61 62 63 64 65 66 |
# File 'lib/txtextcontrol/reportingcloud/merge_settings.rb', line 57 def to_camelized_hash result = { "removeEmptyFields" => @remove_empty_fields, "removeEmptyBlocks" => @remove_empty_blocks, "removeEmptyImages" => @remove_empty_images, "removeTrailingWhitespace" => @remove_trailing_whitespace, "mergeHtml" => @merge_html, } result.merge(super) end |