Parent

Files

Class/Module Index [+]

Quicksearch

ActiveRecord::DynamicScopeMatch

Attributes

attribute_names[R]
scope[R]

Public Class Methods

match(method) click to toggle source
# File lib/active_record/dynamic_scope_match.rb, line 3
def self.match(method)
  ds_match = self.new(method)
  ds_match.scope ? ds_match : nil
end
new(method) click to toggle source
# File lib/active_record/dynamic_scope_match.rb, line 8
def initialize(method)
  @scope = true
  case method.to_s
  when /^scoped_by_([_a-zA-Z]\w*)$/
    names = $1
  else
    @scope = nil
  end
  @attribute_names = names && names.split('_and_')
end

Public Instance Methods

scope?() click to toggle source
# File lib/active_record/dynamic_scope_match.rb, line 21
def scope?
  !@scope.nil?
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.