Class: FuzzyWhere::Generators::PredicateGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- FuzzyWhere::Generators::PredicateGenerator
- Defined in:
- lib/generators/fuzzy_where/predicate_generator.rb
Overview
Generate a new fuzzy predicate
Instance Method Summary collapse
-
#add_fuzzy_predicate ⇒ Object
Add Fuzzy predicate.
Instance Method Details
#add_fuzzy_predicate ⇒ Object
Add Fuzzy predicate
13 14 15 16 17 |
# File 'lib/generators/fuzzy_where/predicate_generator.rb', line 13 def add_fuzzy_predicate return if attributes.empty? append_to_file 'config/fuzzy_predicates.yml', predicate_content(name, attributes) end |