class TXTextControl::ReportingCloud::MergeSettings
Holds the merge settings needed by the merge method. @attr remove_empty_fields
[Boolean] Specifies whether empty fields
should be removed from the template or not.
@attr remove_empty_blocks
[Boolean] Specifies whether the content of
empty merge blocks should be removed from the template or not.
@attr remove_empty_images
[Boolean] Specifies whether images which
don't have merge data should be removed from the template or not.
@attr remove_trailing_whitespace
[Boolean] Specifies whether trailing
whitespace should be removed before saving a document.
@attr merge_html
[Boolean] 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.
@author Thorsten Kummerow (@thomerow)
Attributes
merge_html[RW]
merge_html?[RW]
remove_empty_blocks[RW]
remove_empty_blocks?[RW]
remove_empty_fields[RW]
remove_empty_fields?[RW]
remove_empty_images[RW]
remove_empty_images?[RW]
remove_trailing_whitespace[RW]
remove_trailing_whitespace?[RW]
Public Class Methods
new()
click to toggle source
# 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
Public Instance Methods
to_camelized_hash()
click to toggle source
Converts a MergeSettings
instance to a hash while converting the attribute names from snake case to camel case. @return [Hash] A hash representing the MergeSettings
instance.
Calls superclass method
TXTextControl::ReportingCloud::DocumentSettings#to_camelized_hash
# 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