Skip to content

Commit db0b9d3

Browse files
committed
Add comments
1 parent 716b3fb commit db0b9d3

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Pavel_Borisov/2/checker.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
print "\e[1000D\e[0K#{percent}% complete – now checking #{domain}"
2727
end
2828
print "\e[1000D\e[0K"
29+
2930
domains.results.each { |r| puts r }
3031
puts ''
3132
puts domains.stats

Pavel_Borisov/2/lib/machinery.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
require 'net/http'
66
require 'nokogiri'
77

8+
# Uses OptionParser to collect options into a hash
89
class CliParser
910
attr_reader :options, :args
1011

@@ -28,6 +29,7 @@ def usage
2829
end
2930
end
3031

32+
# Runs check for a single domain and contains the result
3133
class DomainChecker
3234
attr_reader :domain, :code, :response_time, :body, :status
3335

@@ -68,6 +70,9 @@ def result
6870
end
6971
end
7072

73+
# Reads domains list from a file, filters the list according to the supplied options.
74+
# Checks the domains using DomainChecker, filters the results if --filter option is specified.
75+
# Provides methods to format results and stats for output.
7176
class DomainsList
7277
attr_reader :list
7378

0 commit comments

Comments
 (0)