Class: InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::FileWrapper
- Inherits:
-
CoreLibrary::FileWrapper
- Object
- CoreLibrary::FileWrapper
- InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::FileWrapper
- Defined in:
- lib/inventory_management_and_item_management_and_order_management_and_price_management/utilities/file_wrapper.rb
Overview
A utility to allow users to set the content-type for files
Instance Method Summary collapse
-
#initialize(file, content_type: 'application/octet-stream') ⇒ FileWrapper
constructor
The constructor.
-
#to_inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Constructor Details
#initialize(file, content_type: 'application/octet-stream') ⇒ FileWrapper
The constructor.
13 14 15 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/utilities/file_wrapper.rb', line 13 def initialize(file, content_type: 'application/octet-stream') super end |
Instance Method Details
#to_inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
24 25 26 27 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/utilities/file_wrapper.rb', line 24 def to_inspect class_name = self.class.name.split('::').last "<#{class_name} file: #{@file.inspect}, content_type: #{@content_type.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
18 19 20 21 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/utilities/file_wrapper.rb', line 18 def to_s class_name = self.class.name.split('::').last "<#{class_name} file: #{@file}, content_type: #{@content_type}>" end |