class ActiveValidation::Values::MethodName
Public Class Methods
new(value)
click to toggle source
@param value [#to_i, to_s
]
Calls superclass method
ActiveValidation::Values::Base::new
# File lib/active_validation/values/method_name.rb, line 7 def initialize(value) unless allowed_methods.include? value.to_s raise ActiveValidation::Errors::UnsupportedMethodError.new value: value, allowed_methods: allowed_methods end super value.to_s end
Private Instance Methods
allowed_methods()
click to toggle source
# File lib/active_validation/values/method_name.rb, line 17 def allowed_methods %w[validates validates_with validate].freeze end