Module: Formatter::Music
- Defined in:
- lib/formatter/music.rb
Instance Method Summary collapse
- #dump_summary(*args) ⇒ Object
- #kernel ⇒ Object
- #kernel=(kernel) ⇒ Object
- #linux? ⇒ Boolean
- #osx? ⇒ Boolean
- #platform ⇒ Object
- #platform=(platform) ⇒ Object
- #start(input) ⇒ Object
Instance Method Details
#dump_summary(*args) ⇒ Object
35 36 37 38 |
# File 'lib/formatter/music.rb', line 35 def dump_summary(*args) kill_music super end |
#kernel ⇒ Object
17 18 19 |
# File 'lib/formatter/music.rb', line 17 def kernel @kernel ||= Kernel end |
#kernel=(kernel) ⇒ Object
13 14 15 |
# File 'lib/formatter/music.rb', line 13 def kernel=(kernel) @kernel = kernel end |
#linux? ⇒ Boolean
9 10 11 |
# File 'lib/formatter/music.rb', line 9 def linux? platform.downcase.include?('linux') end |
#osx? ⇒ Boolean
5 6 7 |
# File 'lib/formatter/music.rb', line 5 def osx? platform.downcase.include?('darwin') end |
#platform ⇒ Object
25 26 27 |
# File 'lib/formatter/music.rb', line 25 def platform @platform ||= RUBY_PLATFORM end |
#platform=(platform) ⇒ Object
21 22 23 |
# File 'lib/formatter/music.rb', line 21 def platform=(platform) @platform = platform end |
#start(input) ⇒ Object
29 30 31 32 33 |
# File 'lib/formatter/music.rb', line 29 def start(input) super @music_thread = Thread.new { start_music_or_kill(Thread.current) } wait_for_music_to_start(@music_thread) end |