Class: CyclicValueValidation
Constant Summary
collapse
- @@references =
{}
- @@count =
0
Constants included
from Inspectable
Inspectable::INSPECTING_KEY
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from Validation
#as_object_members, #expects_an_object?, memoized_new_from_pattern, new_from_pattern, #validate_from_root
#==
#inspect
Constructor Details
Returns a new instance of CyclicValueValidation.
890
891
892
893
894
|
# File 'lib/json_patterns.rb', line 890
def initialize(opts)
super(opts)
@@count += 1
@@references[self] = @@count
end
|
Instance Attribute Details
#interior ⇒ Object
Returns the value of attribute interior.
886
887
888
|
# File 'lib/json_patterns.rb', line 886
def interior
@interior
end
|
Instance Method Details
#shallow_describe ⇒ Object
904
905
906
|
# File 'lib/json_patterns.rb', line 904
def shallow_describe
interior.shallow_describe
end
|
#shallow_match?(data) ⇒ Boolean
900
901
902
|
# File 'lib/json_patterns.rb', line 900
def shallow_match?(data)
interior.shallow_match?(data)
end
|
#to_s ⇒ Object
908
909
910
911
912
|
# File 'lib/json_patterns.rb', line 908
def to_s
"&#{@@references[self]}"
end
|
#validate(path, data) ⇒ Object
896
897
898
|
# File 'lib/json_patterns.rb', line 896
def validate(path, data)
interior.validate(path, data)
end
|