class Linksta::Checker
Attributes
config[RW]
Public Class Methods
new(config)
click to toggle source
# File lib/linksta.rb, line 55 def initialize(config) @config = YAML.load(File.open("#{config}")) end
Public Instance Methods
base()
click to toggle source
# File lib/linksta.rb, line 59 def base config["base"] end
concurrency()
click to toggle source
# File lib/linksta.rb, line 63 def concurrency config["concurrency"] ? config["concurrency"] : 100 end
smoke()
click to toggle source
# File lib/linksta.rb, line 71 def smoke urls = config["paths"] options = config["headers"] headers = Hash[*options] Getter.new(urls, base, concurrency, status_code, { :headers => headers }).check end
status_code()
click to toggle source
# File lib/linksta.rb, line 67 def status_code config["status_code"] ? config["status_code"] : 200 end