Sha256: 1de16299574d3b049391ad2ded0f9332b0644542620c7944a7c3fbf813b51378
Contents?: true
Size: 558 Bytes
Versions: 4
Compression:
Stored size: 558 Bytes
Contents
require "addressable/uri" class ReminderDomain attr_reader :domain, :expiration, :whois_data def initialize(domain) uri = Addressable::URI.heuristic_parse(domain) host = uri.host host.start_with?('www.') ? host[4..-1] : host @domain = host @expiration = expiration @reminder = ReminderDomain.task_from_domain(@domain) @whois_data = nil end class << self def task_from_domain(domain) Lita::Handlers::Reminder.runner.reminders.select { |task| task.task == "domain expiration #{domain}"}.first end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
lita-reminder-0.1.0 | lib/reminder/domain.rb |
lita-reminder-0.0.3 | lib/reminder/domain.rb |
lita-reminder-0.0.2 | lib/reminder/domain.rb |
lita-reminder-0.0.1 | lib/reminder/domain.rb |