Class: ActiveRecord::DynamicMatchers::FindBy
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Method
|
|
Instance Chain:
self,
Method
|
|
Inherits: |
ActiveRecord::DynamicMatchers::Method
|
Defined in: | activerecord/lib/active_record/dynamic_matchers.rb |
Class Attribute Summary
- .pattern readonly
Class Method Summary
Method
- Inherited
.define, .match, .valid?, .attribute_names, | |
.attributes_hash | Given that the parameters starts with |
.body, .make_pattern, | |
.signature | The parameters in the signature may have reserved Ruby words, in order to prevent errors, we start each param name with |
Class Attribute Details
.pattern (readonly)
[ GitHub ]# File 'activerecord/lib/active_record/dynamic_matchers.rb', line 78
attr_reader :pattern
Class Method Details
.finder
[ GitHub ]# File 'activerecord/lib/active_record/dynamic_matchers.rb', line 84
def finder "find_by" end
.match?(name) ⇒ Boolean
# File 'activerecord/lib/active_record/dynamic_matchers.rb', line 80
def match?(name) pattern.match?(name) && self end