Class: Wings::FileMetadataBuilder::IoDecorator

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/wings/services/file_metadata_builder.rb

Overview

Class for wrapping the file being ingested

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(io, original_filename, content_type, content_length, use) ⇒ IoDecorator

Returns a new instance of IoDecorator.

Parameters:

  • io (IO)

    stream for the file content

  • original_filename (String)
  • content_type (String)
  • use (RDF::URI)

    the URI for the PCDM predicate indicating the use for this resource


77
78
79
80
81
82
83
84
# File 'lib/wings/services/file_metadata_builder.rb', line 77

def initialize(io, original_filename, content_type, content_length, use)
  @original_filename = original_filename
  @content_type = content_type
  @length = content_length
  @use = use
  @tempfile = io
  super(io)
end

Instance Attribute Details

#content_typeObject (readonly)

Returns the value of attribute content_type


71
72
73
# File 'lib/wings/services/file_metadata_builder.rb', line 71

def content_type
  @content_type
end

#lengthObject (readonly)

Returns the value of attribute length


71
72
73
# File 'lib/wings/services/file_metadata_builder.rb', line 71

def length
  @length
end

#original_filenameObject (readonly)

Returns the value of attribute original_filename


71
72
73
# File 'lib/wings/services/file_metadata_builder.rb', line 71

def original_filename
  @original_filename
end

#tempfileObject (readonly)

Returns the value of attribute tempfile


71
72
73
# File 'lib/wings/services/file_metadata_builder.rb', line 71

def tempfile
  @tempfile
end

#useObject (readonly)

Returns the value of attribute use


71
72
73
# File 'lib/wings/services/file_metadata_builder.rb', line 71

def use
  @use
end