Class: ObjectMembersFromObjectValidation

Inherits:
ObjectMembersValidation show all
Defined in:
lib/json_patterns.rb

Constant Summary

Constants included from Inspectable

Inspectable::INSPECTING_KEY

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ObjectMembersValidation

memoized_new_from_pattern

Methods included from HashInitialized

#initialize

Methods included from Inspectable

#inspect

Instance Attribute Details

#object_validationObject (readonly)

TODO: Do this as a separate transformation step when compiling the validation



568
569
570
# File 'lib/json_patterns.rb', line 568

def object_validation
  @object_validation
end

Instance Method Details

#as_object_membersObject



596
597
598
# File 'lib/json_patterns.rb', line 596

def as_object_members
  @object_members_validation ||= @object_validation.as_object_members
end

#first_value_match?(name, value) ⇒ Boolean

Returns:



584
585
586
# File 'lib/json_patterns.rb', line 584

def first_value_match?(name, value)
  as_object_members.first_value_match?(name, value)
end

#first_value_validations(name) ⇒ Object



576
577
578
# File 'lib/json_patterns.rb', line 576

def first_value_validations(name)
  as_object_members.first_value_validations(name)
end

#matching_first_names(data) ⇒ Object



580
581
582
# File 'lib/json_patterns.rb', line 580

def matching_first_names(data)
  as_object_members.matching_first_names(data)
end

#possible_first_namesObject

TODO: Use some sort of delegator to handle these methods?



572
573
574
# File 'lib/json_patterns.rb', line 572

def possible_first_names
  as_object_members.possible_first_names
end

#to_sObject



592
593
594
# File 'lib/json_patterns.rb', line 592

def to_s
  as_object_members.to_s
end

#validate_members(path, data) ⇒ Object



588
589
590
# File 'lib/json_patterns.rb', line 588

def validate_members(path, data)
  as_object_members.validate_members(path, data)
end