class Randrizer::Types::Dict
Public Class Methods
new(keys_def)
click to toggle source
# File lib/randrizer/types/dict.rb, line 9 def initialize(keys_def) @keys_def = keys_def end
Public Instance Methods
empty?()
click to toggle source
# File lib/randrizer/types/dict.rb, line 26 def empty? @keys_def.empty? end
eval()
click to toggle source
# File lib/randrizer/types/dict.rb, line 15 def eval @keys_def.each_with_object({}) do |(key_type, value_type), hash| key = key_type.eval value = value_type.eval next if key == SKIP || value == SKIP hash[key] = value end end
validate!()
click to toggle source
# File lib/randrizer/types/dict.rb, line 13 def validate!; end