Module: LinkChecker::Config
Constant Summary collapse
- ATTRIBUTES =
%i[ methods user_agent logger retries ].freeze
Instance Method Summary collapse
Instance Method Details
#reset ⇒ Object
16 17 18 19 20 21 |
# File 'lib/ruby-link-checker/config.rb', line 16 def reset self.methods = %w[HEAD GET] self.user_agent = "Ruby Link Checker/#{LinkChecker::VERSION}" self.logger = nil self.retries = 0 end |
#retries=(value) ⇒ Object
23 24 25 26 27 |
# File 'lib/ruby-link-checker/config.rb', line 23 def retries=(value) raise ArgumentError, "Invalid number of retries: #{value}" unless value.is_a?(Integer) && value >= 0 @retries = value end |