Class: Cadenya::Types::UploadSpec
- Inherits:
-
Object
- Object
- Cadenya::Types::UploadSpec
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#content_type ⇒ Object
readonly
Returns the value of attribute content_type.
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#size_bytes ⇒ Object
readonly
Returns the value of attribute size_bytes.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(filename: nil, content_type: nil, size_bytes: nil) ⇒ UploadSpec
constructor
A new instance of UploadSpec.
- #to_h ⇒ Object
Constructor Details
#initialize(filename: nil, content_type: nil, size_bytes: nil) ⇒ UploadSpec
Returns a new instance of UploadSpec.
7107 7108 7109 7110 7111 |
# File 'lib/cadenya/types.rb', line 7107 def initialize(filename: nil, content_type: nil, size_bytes: nil) @filename = filename @content_type = content_type @size_bytes = size_bytes end |
Instance Attribute Details
#content_type ⇒ Object (readonly)
Returns the value of attribute content_type.
7105 7106 7107 |
# File 'lib/cadenya/types.rb', line 7105 def content_type @content_type end |
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
7105 7106 7107 |
# File 'lib/cadenya/types.rb', line 7105 def filename @filename end |
#size_bytes ⇒ Object (readonly)
Returns the value of attribute size_bytes.
7105 7106 7107 |
# File 'lib/cadenya/types.rb', line 7105 def size_bytes @size_bytes end |
Class Method Details
.from_json(data) ⇒ Object
7113 7114 7115 7116 7117 7118 7119 |
# File 'lib/cadenya/types.rb', line 7113 def self.from_json(data) new( filename: data["filename"], content_type: data["contentType"], size_bytes: data["sizeBytes"], ) end |