Class: BsPlus::Cli
Constant Summary collapse
- BrowsersOption =
{ 'desktop' => Browser::Desktop, 'ies' => Browser::IEs, 'androids' => Browser::Androids, 'mobile' => Browser::Mobile, 'popular' => Browser::Popular, }
Instance Method Summary collapse
Instance Method Details
#get(url) ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/bs_plus/cli.rb', line 27 def get url url = "http://#{url}" unless url[/http/] (BrowsersOption[[:browsers]] || Browser.parse([:browsers])). tap {|e| puts "Snapshotting with #{e.size} browsers:"}. tap!{|e| Parallel.map(e, in_threads: 5) {|b| b.snapshot url}} end |