asciinema.org/app/helpers/asciicasts_helper.rb

15 lines
321 B
Ruby
Raw Normal View History

2011-11-23 21:30:09 +00:00
module AsciicastsHelper
2011-11-27 12:54:10 +00:00
def player(asciicast, options = PlaybackOptions.new)
render 'asciicasts/player', asciicast: serialized_asciicast(asciicast),
options: options
2011-11-27 12:54:10 +00:00
end
2012-11-19 21:27:52 +00:00
private
def serialized_asciicast(asciicast)
AsciicastSerializer.new(asciicast).to_json
end
2011-11-23 21:30:09 +00:00
end