mirror of
https://github.com/Evolix/chexpire.git
synced 2024-05-23 10:48:50 +02:00
19 lines
327 B
Ruby
19 lines
327 B
Ruby
|
require "null_logger"
|
||
|
require "system_command"
|
||
|
|
||
|
module Whois
|
||
|
class Command
|
||
|
attr_reader :logger
|
||
|
attr_reader :domain
|
||
|
|
||
|
def initialize(domain, logger: NullLogger.new)
|
||
|
@domain = domain
|
||
|
@logger = logger
|
||
|
end
|
||
|
|
||
|
def run
|
||
|
SystemCommand.new("whois", domain, logger: logger).execute
|
||
|
end
|
||
|
end
|
||
|
end
|