Class: TXTextControl::ReportingCloud::MergeSettings
- Inherits:
-
Object
- Object
- 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
-
#author ⇒ String
The document’s author.
-
#creation_date ⇒ DateTime
The document’s creation date.
-
#creator_application ⇒ String
The application which created the document.
-
#document_subject ⇒ String
The document’s subject.
-
#document_title ⇒ String
The document’s title.
-
#last_modification_date ⇒ DateTime
The document’s last modification date.
-
#remove_empty_blocks ⇒ Boolean
Specifies whether the content of empty merge blocks should be removed from the template or not.
-
#remove_empty_fields ⇒ Boolean
Specifies whether empty fields should be removed from the template or not.
-
#remove_empty_images ⇒ Boolean
Specifies whether images which don’t have merge data should be removed from the template or not.
-
#remove_trailing_whitespace ⇒ Boolean
Specifies whether trailing whitespace should be removed before saving a document.
-
#user_password ⇒ String
The password needed to open the document.
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.
45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/txtextcontrol/reportingcloud/merge_settings.rb', line 45 def initialize @remove_empty_fields = true @remove_empty_blocks = true @remove_empty_images = true @remove_trailing_whitespace = true = nil @creation_date = nil @creator_application = nil @document_subject = nil @document_title = nil @last_modification_date = nil @user_password = nil end |
Instance Attribute Details
#author ⇒ String
The document’s author.
34 35 36 |
# File 'lib/txtextcontrol/reportingcloud/merge_settings.rb', line 34 def end |
#creation_date ⇒ DateTime
The document’s creation date.
34 35 36 |
# File 'lib/txtextcontrol/reportingcloud/merge_settings.rb', line 34 def creation_date @creation_date end |
#creator_application ⇒ String
The application which created the document.
34 35 36 |
# File 'lib/txtextcontrol/reportingcloud/merge_settings.rb', line 34 def creator_application @creator_application end |
#document_subject ⇒ String
The document’s subject.
34 35 36 |
# File 'lib/txtextcontrol/reportingcloud/merge_settings.rb', line 34 def document_subject @document_subject end |
#document_title ⇒ String
The document’s title.
34 35 36 |
# File 'lib/txtextcontrol/reportingcloud/merge_settings.rb', line 34 def document_title @document_title end |
#last_modification_date ⇒ DateTime
The document’s last modification date.
34 35 36 |
# File 'lib/txtextcontrol/reportingcloud/merge_settings.rb', line 34 def last_modification_date @last_modification_date end |
#remove_empty_blocks ⇒ Boolean
Specifies whether the content of empty merge blocks should be removed from the template or not.
34 35 36 |
# File 'lib/txtextcontrol/reportingcloud/merge_settings.rb', line 34 def remove_empty_blocks @remove_empty_blocks end |
#remove_empty_fields ⇒ Boolean
Specifies whether empty fields should be removed from the template or not.
34 35 36 |
# File 'lib/txtextcontrol/reportingcloud/merge_settings.rb', line 34 def remove_empty_fields @remove_empty_fields end |
#remove_empty_images ⇒ Boolean
Specifies whether images which don’t have merge data should be removed from the template or not.
34 35 36 |
# File 'lib/txtextcontrol/reportingcloud/merge_settings.rb', line 34 def remove_empty_images @remove_empty_images end |
#remove_trailing_whitespace ⇒ Boolean
Specifies whether trailing whitespace should be removed before saving a document.
34 35 36 |
# File 'lib/txtextcontrol/reportingcloud/merge_settings.rb', line 34 def remove_trailing_whitespace @remove_trailing_whitespace end |
#user_password ⇒ String
The password needed to open the document.
34 35 36 |
# File 'lib/txtextcontrol/reportingcloud/merge_settings.rb', line 34 def user_password @user_password 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.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/txtextcontrol/reportingcloud/merge_settings.rb', line 95 def to_camelized_hash return { "removeEmptyFields" => @remove_empty_fields, "removeEmptyBlocks" => @remove_empty_blocks, "removeEmptyImages" => @remove_empty_images, "removeTrailingWhitespace" => @remove_trailing_whitespace, "author" => , "creationDate" => @creation_date.nil? ? nil : @creation_date.iso8601, "creatorApplication" => @creator_application, "documentSubject" => @document_subject, "documentTitle" => @document_title, "lastModificationDate" => @last_modification_date.nil? ? nil : @last_modification_date.iso8601, "userPassword" => @user_password } end |