Module: TuneYard

Defined in:
lib/tune_yard.rb,
lib/tune_yard/player.rb,
lib/tune_yard/version.rb

Defined Under Namespace

Classes: BasePlayer, DefaultPlayer

Constant Summary collapse

Player =
DefaultPlayer.new
VERSION =
"0.0.2"

Class Method Summary collapse

Class Method Details

.play(opts = {}, &block) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/tune_yard.rb', line 9

def self.play opts={}, &block
  Player.run &block
  if opts[:for]
    sleep opts[:for]
    stop
  end
end

.stopObject



17
18
19
# File 'lib/tune_yard.rb', line 17

def self.stop
  Player.stop
end