X-Git-Url: https://git.r.bdr.sh/rbdr/lyricli/blobdiff_plain/4425e9001e20e891dab7711644f83a1628788b47..5398a7be137c5f4567ec535242eb899a3715269c:/Sources/arguments_source.swift?ds=inline diff --git a/Sources/arguments_source.swift b/Sources/arguments_source.swift index c07c952..d1bf4c6 100644 --- a/Sources/arguments_source.swift +++ b/Sources/arguments_source.swift @@ -1,17 +1,15 @@ /// Source that deals with command line class ArgumentsSource: Source { public var currentTrack: Track? { - get { - if CommandLine.arguments.count >= 3 { + if CommandLine.arguments.count >= 3 { - // expected usage: $ ./lyricli + // expected usage: $ ./lyricli - let trackName: String = CommandLine.arguments[2] - let trackArtist: String = CommandLine.arguments[1] + let trackName: String = CommandLine.arguments[2] + let trackArtist: String = CommandLine.arguments[1] - return Track(withName: trackName, andArtist: trackArtist) - } - return nil + return Track(withName: trackName, andArtist: trackArtist) } + return nil } }