Class: Lyricli::Sources::Arguments

Inherits:
Object
  • Object
show all
Defined in:
lib/lyricli/sources/arguments.rb

Class Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Arguments) initialize

Instantiates everything it needs to run.



18
19
20
# File 'lib/lyricli/sources/arguments.rb', line 18

def initialize
  # Nothing to do.
end

Class Attribute Details

+ (Object) name

Returns the value of attribute name



6
7
8
# File 'lib/lyricli/sources/arguments.rb', line 6

def name
  @name
end

Class Method Details

+ (Object) enable

The enable method should run all of the tasks needed to validate the source. In the case of Rdio it has to authenticate with OAuth.



13
14
15
# File 'lib/lyricli/sources/arguments.rb', line 13

def self.enable
  # Nothing to do.
end

+ (Object) reset

The reset method resets any configurations it may have



32
33
34
# File 'lib/lyricli/sources/arguments.rb', line 32

def self.reset
  # Reset Code
end

Instance Method Details

- (Hash) current_track

The current_track method should return the name of the current artist and song.

Returns:

  • (Hash)

    A hash containing the current `:song` and `:artist`.



25
26
27
28
29
# File 'lib/lyricli/sources/arguments.rb', line 25

def current_track
  artist = ARGV[0]
  song = ARGV[1]
  {artist: artist, song: song}
end