Class: WebChecker::CLI
- Inherits:
-
Thor
- Object
- Thor
- WebChecker::CLI
- Defined in:
- lib/web_checker.rb
Instance Method Summary collapse
Instance Method Details
#start ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/web_checker.rb', line 56 def start trap("INT") { self.stop } begin @checker = WebChecker::Workflow.new() rescue WebChecker::NotHttpURIError, WebChecker::InvalidHostError => e puts "--url error. #{e.}" exit end EventMachine.run do @checker.run end end |