class method self.new

Ruby on Rails 3.1.12

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 346
          def initialize(options = {})
            options.symbolize_keys!
            @prefix, @suffix = options[:prefix] || '', options[:suffix] || ''
            @regex = /\A(#{Regexp.escape(@prefix)})(.+?)(#{Regexp.escape(@suffix)})\z/
            @method_missing_target = "#{@prefix}attribute#{@suffix}"
            @method_name = "#{prefix}%s#{suffix}"
          end

Defined in activemodel/lib/active_model/attribute_methods.rb line 346 · 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