Class: Eg::Music::Browser
- Inherits:
-
Fit::Fixture
- Object
- Fit::Fixture
- Eg::Music::Browser
- 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
- #album ⇒ Object
- #artist ⇒ Object
-
#library(path) ⇒ Object
Library.
- #pause ⇒ Object
-
#play ⇒ Object
Play buttons.
-
#playing ⇒ Object
Select details.
- #remaining ⇒ Object
-
#same_album ⇒ Object
Search buttons.
- #same_artist ⇒ Object
- #same_genre ⇒ Object
- #same_year ⇒ Object
- #select(index) ⇒ Object
- #selected_songs ⇒ Object
- #show_all ⇒ Object
- #status ⇒ Object
- #time ⇒ Object
- #title ⇒ Object
- #total_songs ⇒ Object
- #track ⇒ Object
- #year ⇒ Object
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
#album ⇒ Object
34 |
# File 'lib/eg/music/browser.rb', line 34 def album; MusicLibrary.looking.album; end |
#artist ⇒ Object
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 |
#pause ⇒ Object
53 |
# File 'lib/eg/music/browser.rb', line 53 def pause; MusicPlayer.pause; end |
#play ⇒ Object
Play buttons
52 |
# File 'lib/eg/music/browser.rb', line 52 def play; MusicPlayer.play(MusicLibrary.looking); end |
#playing ⇒ Object
Select details
26 |
# File 'lib/eg/music/browser.rb', line 26 def ; MusicPlayer..title; end |
#remaining ⇒ Object
55 |
# File 'lib/eg/music/browser.rb', line 55 def remaining; MusicPlayer.minutes_remaining; end |
#same_album ⇒ Object
Search buttons
41 |
# File 'lib/eg/music/browser.rb', line 41 def same_album; MusicLibrary.find_album(MusicLibrary.looking.album); end |
#same_artist ⇒ Object
42 |
# File 'lib/eg/music/browser.rb', line 42 def same_artist; MusicLibrary.find_artist(MusicLibrary.looking.artist); end |
#same_genre ⇒ Object
43 |
# File 'lib/eg/music/browser.rb', line 43 def same_genre; MusicLibrary.find_genre(MusicLibrary.looking.genre); end |
#same_year ⇒ Object
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_songs ⇒ Object
46 |
# File 'lib/eg/music/browser.rb', line 46 def selected_songs; MusicLibrary.display_count; end |
#show_all ⇒ Object
48 |
# File 'lib/eg/music/browser.rb', line 48 def show_all; MusicLibrary.find_all; end |
#time ⇒ Object
36 |
# File 'lib/eg/music/browser.rb', line 36 def time; MusicLibrary.looking.time; end |
#title ⇒ Object
32 |
# File 'lib/eg/music/browser.rb', line 32 def title; MusicLibrary.looking.title; end |
#total_songs ⇒ Object
20 21 22 |
# File 'lib/eg/music/browser.rb', line 20 def total_songs MusicLibrary.library.size end |
#track ⇒ Object
37 |
# File 'lib/eg/music/browser.rb', line 37 def track; MusicLibrary.looking.track; end |
#year ⇒ Object
35 |
# File 'lib/eg/music/browser.rb', line 35 def year; MusicLibrary.looking.year; end |