Class: ActiveRecord::DynamicMatchers::FindByBang
- 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.
94 95 96 |
# File 'activerecord/lib/active_record/dynamic_matchers.rb', line 94 def pattern @pattern end |
Class Method Details
.finder ⇒ Object
100 101 102 |
# File 'activerecord/lib/active_record/dynamic_matchers.rb', line 100 def finder "find_by!" end |
.match?(name) ⇒ Boolean
96 97 98 |
# File 'activerecord/lib/active_record/dynamic_matchers.rb', line 96 def match?(name) pattern.match?(name) && self end |