class method self.new

Ruby on Rails 3.0.20

Since v3.0.20 Last seen in v3.2.22.5

Available in: v3.0.20 v3.1.12 v3.2.22.5

Signature

self.new(options = {})

No documentation comment.

Parameters

options opt = {}
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

Type at least 2 characters to search.

↑↓ navigate · open · esc close