Module: Simple::CLI::Deprecations
- Defined in:
- lib/simple/cli/deprecations.rb
Constant Summary collapse
- SELF =
self
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.deprecated!(what, alternative: nil) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/simple/cli/deprecations.rb', line 12 def self.deprecated!(what, alternative: nil) Simple::CLI.logger.error "'#{what}' was removed." if alternative Simple::CLI.logger.info "You probably want to use '#{alternative}' instead." end exit 1 end |
Instance Method Details
#logger ⇒ Object
4 5 6 |
# File 'lib/simple/cli/deprecations.rb', line 4 def logger SELF.deprecated! "Simple::CLI#logger", alternative: "Simple::CLI.logger" end |
#run!(*_) ⇒ Object
8 9 10 |
# File 'lib/simple/cli/deprecations.rb', line 8 def run!(*_) SELF.deprecated! "Simple::CLI#run!", alternative: "Simple::CLI.run!(Your::CLI)" end |