Sha256: 97f0d7e452b6dfd9798e8991b07baa81f8a68476ac466d6965ca4bfd2b1d4664

Contents?: true

Size: 493 Bytes

Versions: 6

Compression:

Stored size: 493 Bytes

Contents

module Makesure
  
  class Summarize
    
    attr_reader :name, :cron, :blk
    
    def initialize(name, cron, blk)
      @name = name
      @cron = cron
      @blk  = blk
    end
    
    def run!
      begin
        
        blk.call
        
      rescue Exception => e
        Makesure.warn "Uh oh, something's up"
        Makesure.warn "\t" + e.message
        
        # send an email with the details
        
        return false
      end
      
      true
    end
    
  end
  
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
makesure-0.0.6 lib/makesure/summarize.rb
makesure-0.0.5 lib/makesure/summarize.rb
makesure-0.0.4 lib/makesure/summarize.rb
makesure-0.0.3 lib/makesure/summarize.rb
makesure-0.0.2 lib/makesure/summarize.rb
makesure-0.0.1 lib/makesure/summarize.rb