Class: LexofficeClient::Document
- Inherits:
-
Model::Base
- Object
- Model::Base
- LexofficeClient::Document
- Defined in:
- lib/lexoffice_client/document.rb
Instance Attribute Summary collapse
-
#blob ⇒ Object
Returns the value of attribute blob.
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#original_filename ⇒ Object
Returns the value of attribute original_filename.
Instance Method Summary collapse
Methods inherited from Model::Base
Methods included from Model::Base::SerializationConcern
Methods included from Model::Base::AttributeNamesConcern
Constructor Details
This class inherits a constructor from LexofficeClient::Model::Base
Instance Attribute Details
#blob ⇒ Object
Returns the value of attribute blob.
3 4 5 |
# File 'lib/lexoffice_client/document.rb', line 3 def blob @blob end |
#content_type ⇒ Object
Returns the value of attribute content_type.
3 4 5 |
# File 'lib/lexoffice_client/document.rb', line 3 def content_type @content_type end |
#original_filename ⇒ Object
Returns the value of attribute original_filename.
3 4 5 |
# File 'lib/lexoffice_client/document.rb', line 3 def original_filename @original_filename end |
Instance Method Details
#to_string_io ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/lexoffice_client/document.rb', line 5 def to_string_io StringIO.new(blob || "").tap do |string_io| string_io.class.class_eval do attr_accessor :original_filename, :content_type end string_io.content_type = content_type string_io.original_filename = original_filename end end |