class Eapi::DefinitionRunners::List
Public Instance Methods
run()
click to toggle source
# File lib/eapi/definition_runners/list.rb, line 6 def run run_validations end
Private Instance Methods
allow_raw?()
click to toggle source
# File lib/eapi/definition_runners/list.rb, line 63 def allow_raw? definition.fetch(:allow_raw, false) end
element_type()
click to toggle source
# File lib/eapi/definition_runners/list.rb, line 59 def element_type definition.fetch(:element_type, nil) || definition.fetch(:type, nil) end
required?()
click to toggle source
# File lib/eapi/definition_runners/list.rb, line 47 def required? definition.fetch(:required, false) end
run_allow_raw()
click to toggle source
# File lib/eapi/definition_runners/list.rb, line 43 def run_allow_raw Runner.allow_raw(klass: klass, field: :_list, allow_raw: allow_raw?) end
run_required()
click to toggle source
# File lib/eapi/definition_runners/list.rb, line 37 def run_required if required? Runner.required(klass: klass, field: :_list) end end
run_validate_element_type()
click to toggle source
# File lib/eapi/definition_runners/list.rb, line 31 def run_validate_element_type if element_type Runner.validate_element_type(klass: klass, field: :_list, element_type: element_type) end end
run_validate_element_with()
click to toggle source
# File lib/eapi/definition_runners/list.rb, line 25 def run_validate_element_with if validate_element_with Runner.validate_element_with klass: klass, field: :_list, validate_element_with: validate_element_with end end
run_validate_uniqueness()
click to toggle source
# File lib/eapi/definition_runners/list.rb, line 19 def run_validate_uniqueness if unique? Runner.unique klass: klass, field: :_list end end
run_validations()
click to toggle source
# File lib/eapi/definition_runners/list.rb, line 11 def run_validations run_required run_validate_element_type run_validate_element_with run_validate_uniqueness run_allow_raw end
unique?()
click to toggle source
# File lib/eapi/definition_runners/list.rb, line 51 def unique? definition.fetch(:unique, false) end
validate_element_with()
click to toggle source
# File lib/eapi/definition_runners/list.rb, line 55 def validate_element_with definition.fetch(:validate_element_with, nil) || definition.fetch(:validate_with, nil) end