Class: ActiveRecord::DynamicMatchers::FindBy
- Defined in:
- activerecord/lib/active_record/dynamic_matchers.rb
Class Attribute Summary collapse
-
.pattern ⇒ Object
readonly
Returns the value of attribute pattern.
Class Method Summary collapse
Methods inherited from Method
Class Attribute Details
.pattern ⇒ Object (readonly)
Returns the value of attribute pattern.
78 79 80 |
# File 'activerecord/lib/active_record/dynamic_matchers.rb', line 78 def pattern @pattern end |
Class Method Details
.finder ⇒ Object
84 85 86 |
# File 'activerecord/lib/active_record/dynamic_matchers.rb', line 84 def finder "find_by" end |
.match?(name) ⇒ Boolean
80 81 82 |
# File 'activerecord/lib/active_record/dynamic_matchers.rb', line 80 def match?(name) pattern.match?(name) && self end |