class method
self.new
Ruby on Rails 3.0.20
Since v3.0.20 Last seen in v3.2.22.5Signature
self.new(options = {})
No documentation comment.
Parameters
-
optionsopt = {}
Source
# File activemodel/lib/active_model/attribute_methods.rb, line 347
def initialize(options = {})
options.symbolize_keys!
@prefix, @suffix = options[:prefix] || '', options[:suffix] || ''
@regex = /^(#{Regexp.escape(@prefix)})(.+?)(#{Regexp.escape(@suffix)})$/
end
Defined in activemodel/lib/active_model/attribute_methods.rb line 347
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::AttributeMethods::ClassMethods::AttributeMethodMatcher