Class: Ektoplayer::Operations::Player

Inherits:
Object
  • Object
show all
Defined in:
lib/ektoplayer/operations/player.rb

Instance Method Summary collapse

Constructor Details

#initialize(operations, player) ⇒ Player

Returns a new instance of Player.



4
5
6
7
8
# File 'lib/ektoplayer/operations/player.rb', line 4

def initialize(operations, player)
   register = operations.with_register('player.')
   %w(play stop pause toggle forward backward).
      each { |op| register.(op, &player.method(op)) }
end