Sha256: b7589b3d4d6b25cfc8243e460d5a0c8b9beb8b699a65e4a5ad7b7bc3563d5b3f
Contents?: true
Size: 540 Bytes
Versions: 3
Compression:
Stored size: 540 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.option '-y', '--year YEAR', 'WWDC Year' c.action do |args, options| determine_session!(args, options) determine_year!(args, options) @session = get(path: "/#{@year}/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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
wwdc-1.1.1 | ./lib/wwdc/commands/open.rb |
wwdc-1.1.0 | ./lib/wwdc/commands/open.rb |
wwdc-1.0.0 | ./lib/wwdc/commands/open.rb |