Class: Lite::Validation::Validator::Result::Disputed::Abstract::Hash

Inherits:
Instance show all
Includes:
Lite::Validation::Validator::Result::Disputable::Hash
Defined in:
lib/lite/validation/validator/result/disputed/abstract/hash.rb

Direct Known Subclasses

Iterable::Hash

Constant Summary

Constants included from Abstract

Abstract::EMPTY

Instance Method Summary collapse

Methods included from Lite::Validation::Validator::Result::Disputable::Hash

#child

Methods included from Abstract::Failure

#to_failure

Methods included from Result::Abstract::Failure

#failure?, #to_result

Methods inherited from Lite::Validation::Validator::Result::Disputable::Instance

#committed?, #refute, #refuted?

Methods included from Result::Abstract::Refutable

#refute, #refuted?

Methods included from Result::Abstract::Disputable

#dispute

Methods included from Result::Abstract

#success?

Instance Method Details

#append(result, key) ⇒ Object

Raises:



17
18
19
20
21
# File 'lib/lite/validation/validator/result/disputed/abstract/hash.rb', line 17

def append(result, key)
  raise Error::Fatal, "Key already taken #{key}" if children.key? key

  super
end

#signature(class_name) ⇒ Object



23
24
25
# File 'lib/lite/validation/validator/result/disputed/abstract/hash.rb', line 23

def signature(class_name)
  super(class_name, " with #{errors_root.count} root errors, #{children.count} children")
end