module AsciicastsHelper def player_script(asciicast) return < $(function() { window.player = new AsciiIo.PlayerView({ el: $('.player'), cols: #{asciicast.terminal_columns}, lines: #{asciicast.terminal_lines}, model: new AsciiIo.Asciicast({ id: #{asciicast.id} }) }); }); EOS end end