Class: PDFire::MergeParams
- Inherits:
-
Object
- Object
- PDFire::MergeParams
- Defined in:
- lib/merge_params.rb
Instance Attribute Summary collapse
- #cdn ⇒ Boolean
- #documents ⇒ Array<PDFire::ConversionParams>
- #owner_password ⇒ String
- #storage ⇒ Boolean, Hash
- #user_password ⇒ String
Instance Method Summary collapse
-
#initialize(documents = []) ⇒ MergeParams
constructor
A new instance of MergeParams.
- #to_map ⇒ Object
Constructor Details
#initialize(documents = []) ⇒ MergeParams
Returns a new instance of MergeParams.
14 15 16 17 18 19 20 |
# File 'lib/merge_params.rb', line 14 def initialize(documents = []) @documents = documents @cdn = nil @storage = nil @owner_password = nil @user_password = nil end |
Instance Attribute Details
#cdn ⇒ Boolean
6 7 8 |
# File 'lib/merge_params.rb', line 6 def cdn @cdn end |
#documents ⇒ Array<PDFire::ConversionParams>
4 5 6 |
# File 'lib/merge_params.rb', line 4 def documents @documents end |
#owner_password ⇒ String
10 11 12 |
# File 'lib/merge_params.rb', line 10 def owner_password @owner_password end |
#storage ⇒ Boolean, Hash
8 9 10 |
# File 'lib/merge_params.rb', line 8 def storage @storage end |
#user_password ⇒ String
12 13 14 |
# File 'lib/merge_params.rb', line 12 def user_password @user_password end |
Instance Method Details
#to_map ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/merge_params.rb', line 22 def to_map map = {} map['documents'] = @documents.map { |doc| doc.to_map } if @documents.length > 0 map['cdn'] = @cdn if @cdn != nil map['storage'] = @storage if @storage != nil map['ownerPassword'] = @owner_password if @owner_password != nil map['userPassword'] = @user_password if @user_password != nil return map end |