Class: CyclicObjectMembersValidation
Constant Summary
collapse
- @@references =
{}
- @@count =
0
Constants included
from Inspectable
Inspectable::INSPECTING_KEY
Instance Attribute Summary collapse
Instance Method Summary
collapse
memoized_new_from_pattern
#inspect
Constructor Details
Returns a new instance of CyclicObjectMembersValidation.
927
928
929
930
931
|
# File 'lib/json_patterns.rb', line 927
def initialize(opts)
super(opts)
@@count += 1
@@references[self] = @@count
end
|
Instance Attribute Details
#members ⇒ Object
Returns the value of attribute members.
923
924
925
|
# File 'lib/json_patterns.rb', line 923
def members
@members
end
|
Instance Method Details
#first_value_match?(name, value) ⇒ Boolean
941
942
943
|
# File 'lib/json_patterns.rb', line 941
def first_value_match?(name, value)
@members.first_value_match?(name, value)
end
|
#first_value_validations(name) ⇒ Object
945
946
947
|
# File 'lib/json_patterns.rb', line 945
def first_value_validations(name)
@members.first_value_validations(name)
end
|
#matching_first_names(data) ⇒ Object
937
938
939
|
# File 'lib/json_patterns.rb', line 937
def matching_first_names(data)
@members.matching_first_names(data)
end
|
#possible_first_names ⇒ Object
933
934
935
|
# File 'lib/json_patterns.rb', line 933
def possible_first_names
@members.possible_first_names
end
|
#to_s ⇒ Object
953
954
955
|
# File 'lib/json_patterns.rb', line 953
def to_s
"&:#{@@references[self]}"
end
|
#validate_members(path, data) ⇒ Object
949
950
951
|
# File 'lib/json_patterns.rb', line 949
def validate_members(path, data)
@members.validate_members(path, data)
end
|