Class: DynamicPDFApi::DlexResource
- Defined in:
- lib/ruby_client/DlexResource.rb
Overview
Represents a Dlex resource object that is created using the DLEX file and a name.
Instance Attribute Summary collapse
-
#layout_data_resource_name ⇒ Object
Gets or sets name for layout data resource.
Attributes inherited from Resource
#_file_path, #_mime_type, #data, #resource_name
Instance Method Summary collapse
- #_file_extension ⇒ Object
-
#initialize(dlex, resource_name = nil) ⇒ DlexResource
constructor
Initializes a new instance of the DlexResource class with DLEX file path and resource name as parameters.
- #to_json(_options = {}) ⇒ Object
Methods inherited from Resource
Constructor Details
#initialize(dlex, resource_name = nil) ⇒ DlexResource
Initializes a new instance of the DlexResource class with DLEX file path and resource name as parameters.
15 16 17 18 19 20 |
# File 'lib/ruby_client/DlexResource.rb', line 15 def initialize(dlex, resource_name = nil) @layout_data_resource_name = nil @_type = ResourceType::DLEX @_mime_type = 'application/xml' super(dlex, resource_name) end |
Instance Attribute Details
#layout_data_resource_name ⇒ Object
Gets or sets name for layout data resource.
29 30 31 |
# File 'lib/ruby_client/DlexResource.rb', line 29 def layout_data_resource_name @layout_data_resource_name end |
Instance Method Details
#_file_extension ⇒ Object
22 23 24 |
# File 'lib/ruby_client/DlexResource.rb', line 22 def _file_extension '.dlex' end |
#to_json(_options = {}) ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/ruby_client/DlexResource.rb', line 31 def to_json( = {}) json_array = {} json_array['type'] = 'dlex' json_array['layoutDataResourceName'] = @layout_data_resource_name json_array['resourceName'] = @resource_name JSON.pretty_generate(json_array) end |