Sha256: 3ce9155c4d6e51d94e45a6bbb9efbb09aa180f52307cdf813f954725703340ba

Contents?: true

Size: 461 Bytes

Versions: 2

Compression:

Stored size: 461 Bytes

Contents

command :search do |c|
  c.syntax = 'wwdc search [QUERY]'
  c.summary = 'Find sessions containing the specified search terms'
  c.description = ''

  c.action do |args, options|
    @query = args.join(" ")
    say_error "Missing session number" and abort if @query.empty?

    json = get(path: "search", query: {q: @query})

    json['results'].each do |result|
      describe result
    end
  end
end

alias_command :'?', :search
alias_command :query, :search

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wwdc-0.0.2 ./lib/wwdc/commands/search.rb
wwdc-0.0.1 ./lib/wwdc/commands/search.rb