Method: MediaTypes::Scheme::Rules#initialize

Defined in:
lib/media_types/scheme/rules.rb

#initialize(allow_empty:, expected_type:) ⇒ Rules

Returns a new instance of Rules.



11
12
13
14
15
16
17
18
19
# File 'lib/media_types/scheme/rules.rb', line 11

def initialize(allow_empty:, expected_type:)
  super({})

  self.allow_empty = allow_empty
  self.expected_type = expected_type
  self.optional_keys = []

  self.default = MissingValidation.new
end