Methods
Attributes
[R] | attribute_names | |
[R] | scope |
Public Class methods
[ show source ]
# File activerecord/lib/active_record/dynamic_scope_match.rb, line 3 3: def self.match(method) 4: ds_match = self.new(method) 5: ds_match.scope ? ds_match : nil 6: end
[ show source ]
# File activerecord/lib/active_record/dynamic_scope_match.rb, line 8 8: def initialize(method) 9: @scope = true 10: case method.to_s 11: when /^scoped_by_([_a-zA-Z]\w*)$/ 12: names = $1 13: else 14: @scope = nil 15: end 16: @attribute_names = names && names.split('_and_') 17: end
Public Instance methods
[ show source ]
# File activerecord/lib/active_record/dynamic_scope_match.rb, line 21 21: def scope? 22: !@scope.nil? 23: end