]> git.r.bdr.sh - rbdr/lyricli/blobdiff - Sources/arguments_source.swift
Add docs and lint info to readme
[rbdr/lyricli] / Sources / arguments_source.swift
index c07c9522102cb8a125c6dfcd35009f50fad094e9..d1bf4c607a992e3ce91ad4357531ba965b7f5d8a 100644 (file)
@@ -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 <artist> <name>
+            // expected usage: $ ./lyricli <artist> <name>
 
-                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
     }
 }