Sha256: b7223288fead50bb489edb3dfe17b43d73bf0c65c76366cf3794c21a8f8e3eba
Contents?: true
Size: 538 Bytes
Versions: 2
Compression:
Stored size: 538 Bytes
Contents
command :open do |c| c.syntax = 'wwdc open [SESSION]' c.summary = 'Open your browser to the Apple Developer Center to view session slides and video' c.description = '' c.action do |args, options| say_error "Missing session number" and abort unless @number = (Integer(args.first) rescue nil) session = get(path: "/2013/sessions/#{@number}") do |response| url = response.headers['Link'].scan(/\<(.+)\>/).flatten.first `open "#{url}"` end end end alias_command :video, :open alias_command :slides, :open
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
wwdc-0.0.2 | ./lib/wwdc/commands/open.rb |
wwdc-0.0.1 | ./lib/wwdc/commands/open.rb |