class ActiveValidation::Check

Public Instance Methods

method_name() click to toggle source
# File lib/active_validation/orm_plugins/active_record_plugin/models/active_validation/check.rb, line 16
def method_name
  raise NotImplementedError, "abstract" unless self.class < Check

  self.class.name.demodulize.sub(/Method\z/, "").underscore
end
method_name=(other) click to toggle source
# File lib/active_validation/orm_plugins/active_record_plugin/models/active_validation/check.rb, line 22
def method_name=(other)
  self.type = other.camelcase + "Method"
end
to_internal_check() click to toggle source
# File lib/active_validation/orm_plugins/active_record_plugin/models/active_validation/check.rb, line 26
def to_internal_check
  json_options = { methods: %i[method_name], root: false }
  ActiveValidation::Internal::Models::Check.new as_json(json_options).to_options!
end