Class: Eg::Music::Browser

Inherits:
Fit::Fixture show all
Defined in:
lib/eg/music/browser.rb

Constant Summary

Constants inherited from Fit::Fixture

Fit::Fixture::GRAY, Fit::Fixture::GREEN, Fit::Fixture::RED, Fit::Fixture::YELLOW

Instance Attribute Summary

Attributes inherited from Fit::Fixture

#args, #counts, #listener, #summary

Instance Method Summary collapse

Methods inherited from Fit::Fixture

camel, #check, #do_cell, #do_cells, #do_row, #do_rows, #do_table, #do_tables, #error, escape, #exception, #find_class, #fixture_name, #get_args_for_table, #get_linked_fixture_with_args, gray, #ignore, #info, #initialize, #interpret_following_tables, #interpret_tables, label, metadata, #parse, #right, #total_errors, #totals, #wrong

Constructor Details

This class inherits a constructor from Fit::Fixture

Instance Method Details

#albumObject



34
# File 'lib/eg/music/browser.rb', line 34

def album; MusicLibrary.looking.album; end

#artistObject



33
# File 'lib/eg/music/browser.rb', line 33

def artist; MusicLibrary.looking.artist; end

#library(path) ⇒ Object

Library



15
16
17
18
# File 'lib/eg/music/browser.rb', line 15

def library path
  filename = path[path.rindex('/')..-1]
  MusicLibrary.load File.join(File.dirname(__FILE__), filename)
end

#pauseObject



53
# File 'lib/eg/music/browser.rb', line 53

def pause; MusicPlayer.pause; end

#playObject

Play buttons



52
# File 'lib/eg/music/browser.rb', line 52

def play; MusicPlayer.play(MusicLibrary.looking); end

#playingObject

Select details



26
# File 'lib/eg/music/browser.rb', line 26

def playing; MusicPlayer.playing.title; end

#remainingObject



55
# File 'lib/eg/music/browser.rb', line 55

def remaining; MusicPlayer.minutes_remaining; end

#same_albumObject

Search buttons



41
# File 'lib/eg/music/browser.rb', line 41

def same_album; MusicLibrary.find_album(MusicLibrary.looking.album); end

#same_artistObject



42
# File 'lib/eg/music/browser.rb', line 42

def same_artist; MusicLibrary.find_artist(MusicLibrary.looking.artist); end

#same_genreObject



43
# File 'lib/eg/music/browser.rb', line 43

def same_genre; MusicLibrary.find_genre(MusicLibrary.looking.genre); end

#same_yearObject



44
# File 'lib/eg/music/browser.rb', line 44

def same_year; MusicLibrary.find_year(MusicLibrary.looking.year); end

#select(index) ⇒ Object



28
29
30
# File 'lib/eg/music/browser.rb', line 28

def select index
  MusicLibrary.select MusicLibrary.library[index - 1]
end

#selected_songsObject



46
# File 'lib/eg/music/browser.rb', line 46

def selected_songs; MusicLibrary.display_count; end

#show_allObject



48
# File 'lib/eg/music/browser.rb', line 48

def show_all; MusicLibrary.find_all; end

#statusObject



54
# File 'lib/eg/music/browser.rb', line 54

def status; Music.status; end

#timeObject



36
# File 'lib/eg/music/browser.rb', line 36

def time; MusicLibrary.looking.time; end

#titleObject



32
# File 'lib/eg/music/browser.rb', line 32

def title; MusicLibrary.looking.title; end

#total_songsObject



20
21
22
# File 'lib/eg/music/browser.rb', line 20

def total_songs
  MusicLibrary.library.size
end

#trackObject



37
# File 'lib/eg/music/browser.rb', line 37

def track; MusicLibrary.looking.track; end

#yearObject



35
# File 'lib/eg/music/browser.rb', line 35

def year; MusicLibrary.looking.year; end