]> git.r.bdr.sh - rbdr/lyricli.rb/blame - lib/lyricli/sources/arguments.rb
Merge pull request #2 from orlando/master
[rbdr/lyricli.rb] / lib / lyricli / sources / arguments.rb
CommitLineData
d3e32008
BB
1module Lyricli
2 module Sources
f2ec7254
BB
3 # The arguments source. This one is special since it expects two
4 # arguments. It is treated specially by the SourceManager.
d3e32008
BB
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]
178ffe13 30 {:artist => artist, :song => song}
d3e32008
BB
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
39end