Class: Kombo::Models::Shared::Schema2FileRestrictions

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/kombo/models/shared/schema2_file_restrictions.rb

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(accepted_mime_types:, max_file_size: nil) ⇒ Schema2FileRestrictions

Returns a new instance of Schema2FileRestrictions.



21
22
23
24
# File 'lib/kombo/models/shared/schema2_file_restrictions.rb', line 21

def initialize(accepted_mime_types:, max_file_size: nil)
  @accepted_mime_types = accepted_mime_types
  @max_file_size = max_file_size
end

Instance Method Details

#==(other) ⇒ Object



27
28
29
30
31
32
# File 'lib/kombo/models/shared/schema2_file_restrictions.rb', line 27

def ==(other)
  return false unless other.is_a? self.class
  return false unless @accepted_mime_types == other.accepted_mime_types
  return false unless @max_file_size == other.max_file_size
  true
end