class Yacs::Cli::Command

Constants

COURSE_API_OPTIONS
SECTION_API_OPTIONS
SYSTEM_OPTIONS

Public Instance Methods

course() click to toggle source
# File lib/yacs/cli.rb, line 16
def course
  courses = Yacs::Client.new.courses(options)
  fields = %w(id)
  unless options['q']
    fields << 'name'
    fields << 'description' if options['v']
  end
  Printer.print courses, fields
end
section() click to toggle source
# File lib/yacs/cli.rb, line 29
def section
  sections = Yacs::Client.new.sections(options)
  fields = %w(id)
  unless options['q']
    fields.concat %w(name crn instructors seats_taken seats)
  end
  Printer.print sections, fields
end