diff options
| author | Ben Beltran <ben@nsovocal.com> | 2017-05-20 09:40:03 -0500 |
|---|---|---|
| committer | Ben Beltran <ben@nsovocal.com> | 2017-05-20 09:40:03 -0500 |
| commit | d852b84edc24f1f1bbf4c34aa359447970e732b0 (patch) | |
| tree | ca3abc17d3b5077db6b6a1e6d70e4702613eb427 /Sources/arguments_source.swift | |
| parent | 34ce0eef8e29cb156e6fb92fc3bf7ad13ff9598c (diff) | |
Improve comments in code
Diffstat (limited to 'Sources/arguments_source.swift')
| -rw-r--r-- | Sources/arguments_source.swift | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Sources/arguments_source.swift b/Sources/arguments_source.swift index d1bf4c6..9615318 100644 --- a/Sources/arguments_source.swift +++ b/Sources/arguments_source.swift @@ -1,10 +1,13 @@ -/// Source that deals with command line +// Source that reads track artist and name from the command line class ArgumentsSource: Source { - public var currentTrack: Track? { - if CommandLine.arguments.count >= 3 { - // expected usage: $ ./lyricli <artist> <name> + // Returns a track based on the arguments. It assumes the track artist + // will be the first argument, and the name will be the second, excluding + // any flags. + var currentTrack: Track? { + if CommandLine.arguments.count >= 3 { + // expected usage: $ ./lyricli <artist> <name> let trackName: String = CommandLine.arguments[2] let trackArtist: String = CommandLine.arguments[1] |