Sha256: dc230c1dcac68155bbf1af8e1c832f8982379e34155325aed74879f36fc1d8a2

Contents?: true

Size: 815 Bytes

Versions: 2

Compression:

Stored size: 815 Bytes

Contents

module Chkex
  module Source
    class Base
      attr_accessor :results

      def initialize(source_list)
        @now = Date.today
        @source = source_list
        @results = { success: {}, errors: {} }

        process
      end

      def strip(url)
        url.gsub('http://', '')
          .gsub('https://', '')
          .gsub('www.', '')
          .gsub('/', '')
      end

      # def process_list
      #   result = Process.new(url)

      #   @results[:errors][result.error] = { domain: result.url } unless result.error.nil?

      #   next unless result.error.nil?

      #   expiry_date = Date.parse(result.expires_on.strftime('%Y-%m-%d'))
      #   diff = expiry_date.mjd - @now.mjd

      #   @results[:success][diff] = { expiry: expiry_date, domain: result.url }
      # end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
chkex-0.1.1 lib/chkex/sources/base.rb
chkex-0.1.0 lib/chkex/sources/base.rb