asciinema.org/app/presenters/bare_asciicast_page_presenter.rb
2016-04-21 16:44:43 +02:00

22 lines
512 B
Ruby

class BareAsciicastPagePresenter
attr_reader :asciicast, :playback_options
def self.build(asciicast, playback_options = {})
decorated_asciicast = asciicast.decorate
playback_options = {
'theme' => decorated_asciicast.theme_name,
'preload' => false
}.merge(playback_options)
new(decorated_asciicast, EmbedPlaybackOptions.new(playback_options))
end
def initialize(asciicast, playback_options)
@asciicast = asciicast
@playback_options = playback_options
end
end