Class: SRS::CLI::NextNew
- Inherits:
-
Object
- Object
- SRS::CLI::NextNew
- Defined in:
- lib/srs/cli/next-new.rb
Instance Method Summary collapse
Instance Method Details
#help ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/srs/cli/next-new.rb', line 18 def help() puts <<-EOF srs next-new Prints out the id of the next untested schedule. Prints nothing if there are no pending schedules. EOF end |
#run!(arguments) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/srs/cli/next-new.rb', line 4 def run!(arguments) if not SRS::Workspace.initialised? then puts "Current directory is not an SRS Workspace" return 3 end new_schedules = Dir["schedule/pending/*"].sort if not new_schedules.empty? puts File.basename new_schedules.first end return 0 end |