Module: Notifaction::Helpers
- Included in:
- Notify
- Defined in:
- lib/notifaction/helpers.rb
Instance Method Summary collapse
-
#auto_quit_enabled?(config, user_conf) ⇒ Boolean
Should method exit with Type::QUIT? Mainly used in tests.
-
#deprecation_notice(version, config = {}) ⇒ Object
Alert the user that the method they’ve called is not supported.
Instance Method Details
#auto_quit_enabled?(config, user_conf) ⇒ Boolean
Should method exit with Type::QUIT? Mainly used in tests
16 17 18 |
# File 'lib/notifaction/helpers.rb', line 16 def auto_quit_enabled?(config, user_conf) config[:auto_quit] == false || user_conf.config("auto_quit") == false end |
#deprecation_notice(version, config = {}) ⇒ Object
Alert the user that the method they’ve called is not supported
5 6 7 8 9 10 11 12 |
# File 'lib/notifaction/helpers.rb', line 5 def deprecation_notice(version, config = {}) handler = Notifaction::Type::Terminal.new handler.warning( "Deprecated as of #{version}, current #{Notifaction::VERSION}", config ) handler.quit_soft end |