method
new
v3.0.0 -
Show latest stable
- Class:
ActiveModel::AttributeMethods::ClassMethods::AttributeMethodMatcher
new(options = {})public
No documentation available.
# File activemodel/lib/active_model/attribute_methods.rb, line 323
def initialize(options = {})
options.symbolize_keys!
@prefix, @suffix = options[:prefix] || '', options[:suffix] || ''
@regex = /^(#{Regexp.escape(@prefix)})(.+?)(#{Regexp.escape(@suffix)})$/
end