Parent

Class Index [+]

Quicksearch

ActiveModel::AttributeMethods::ClassMethods::AttributeMethodMatcher

Constants

AttributeMethodMatch

Attributes

prefix[R]
suffix[R]

Public Class Methods

new(options = {}) click to toggle source
     # File lib/active_model/attribute_methods.rb, line 319
319:           def initialize(options = {})
320:             options.symbolize_keys!
321:             @prefix, @suffix = options[:prefix] || '', options[:suffix] || ''
322:             @regex = /^(#{Regexp.escape(@prefix)})(.+?)(#{Regexp.escape(@suffix)})$/
323:           end

Public Instance Methods

match(method_name) click to toggle source
     # File lib/active_model/attribute_methods.rb, line 325
325:           def match(method_name)
326:             if matchdata = @regex.match(method_name)
327:               AttributeMethodMatch.new(method_missing_target, matchdata[2])
328:             else
329:               nil
330:             end
331:           end
method_missing_target() click to toggle source
     # File lib/active_model/attribute_methods.rb, line 337
337:           def method_missing_target
338:             :"#{prefix}attribute#{suffix}"
339:           end
method_name(attr_name) click to toggle source
     # File lib/active_model/attribute_methods.rb, line 333
333:           def method_name(attr_name)
334:             "#{prefix}#{attr_name}#{suffix}"
335:           end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.