]> git.r.bdr.sh - rbdr/lyricli.rb/blob - lib/lyricli/sources/arguments.rb
Skeletons for the exceptions
[rbdr/lyricli.rb] / lib / lyricli / sources / arguments.rb
1 module Lyricli
2 module Sources
3 # The arguments source. This one is special since it expects two
4 # arguments. It is treated specially by the SourceManager.
5 class Arguments
6
7 class << self
8 attr_accessor :name
9 end
10
11 @name = "arguments"
12
13 # The enable method should run all of the tasks needed to validate
14 # the source. In the case of Rdio it has to authenticate with OAuth.
15 def self.enable
16 # Nothing to do.
17 end
18
19 # Instantiates everything it needs to run.
20 def initialize
21 # Nothing to do.
22 end
23
24 # The current_track method should return the name of the current
25 # artist and song.
26 # @return [Hash] A hash containing the current `:song` and `:artist`.
27 def current_track
28 artist = ARGV[0]
29 song = ARGV[1]
30 {artist: artist, song: song}
31 end
32
33 # The reset method resets any configurations it may have
34 def self.reset
35 # Reset Code
36 end
37 end
38 end
39 end