Class: LazyNames::Logger
- Inherits:
-
Object
- Object
- LazyNames::Logger
- Defined in:
- lib/lazy_names/logger.rb
Class Method Summary collapse
- .warn_duplicate_definition(errors, config_path) ⇒ Object
- .warn_empty_definitions(errors, config_path) ⇒ Object
- .warn_undefined(errors, config_path) ⇒ Object
Class Method Details
.warn_duplicate_definition(errors, config_path) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/lazy_names/logger.rb', line 20 def warn_duplicate_definition(errors, config_path) return if errors.empty? = " Error loading lazy_names gem.\n Found \#{errors.size} already defined constants.\n Using same lazy names for different constants may lead to unexpected results\n Avoid duplications in your config file.\n \#{config_path}\n \\n\n MSG\n\n warn(message)\nend\n" |
.warn_empty_definitions(errors, config_path) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/lazy_names/logger.rb', line 35 def warn_empty_definitions(errors, config_path) return unless errors = " Error loading lazy_names gem.\n Seems like you misspelled namespace in config.\n \#{config_path}\n Please ensure word definitions exists in config\n or check .lazy_names.tt.yml for consistency.\n MSG\n\n warn(message)\nend\n" |
.warn_undefined(errors, config_path) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/lazy_names/logger.rb', line 6 def warn_undefined(errors, config_path) return if errors.empty? = " Error loading lazy_names gem.\n Found \#{errors.size} undefined constants.\n Please check spelling for \#{errors.join(', ')}\n \#{config_path}\n \\n\n MSG\n\n warn(message)\nend\n" |