Class: BsPlus::Cli
Instance Method Summary collapse
Instance Method Details
#get(url) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/bs_plus/cli.rb', line 17 def get url url = "http://#{url}" unless url[/http/] case [:browsers] when 'popular' then Browser::Popular when 'ies' then Browser::IEs else Browser.parse [:browsers] end. tap {|e| puts "Snapshotting with #{e.size} browsers:"}. tap!{|e| Parallel.map(e, in_threads: 5) {|b| b.snapshot url}} end |