Class: OpenFeature::SDK::Hooks::Hints

Inherits:
Hash
  • Object
show all
Defined in:
lib/open_feature/sdk/hooks/hints.rb

Constant Summary collapse

ALLOWED_TYPES =
[String, Symbol, Numeric, TrueClass, FalseClass, Time, Hash, Array].freeze

Instance Method Summary collapse

Constructor Details

#initialize(hash = {}) ⇒ Hints

Returns a new instance of Hints.



9
10
11
12
13
14
15
16
17
# File 'lib/open_feature/sdk/hooks/hints.rb', line 9

def initialize(hash = {})
  hash.each do |key, value|
    assert_allowed_key(key)
    assert_allowed_value(value)
  end
  @hash = hash.dup
  super(@hash)
  freeze
end