2014-02-01 00:26:58 +00:00
|
|
|
class BareAsciicastPagePresenter
|
2014-01-18 13:53:15 +00:00
|
|
|
|
|
|
|
attr_reader :asciicast, :playback_options
|
|
|
|
|
2015-03-30 10:23:58 +00:00
|
|
|
def self.build(asciicast, playback_options = {})
|
2014-07-01 20:35:47 +00:00
|
|
|
decorated_asciicast = asciicast.decorate
|
|
|
|
|
|
|
|
playback_options = {
|
|
|
|
'theme' => decorated_asciicast.theme_name
|
|
|
|
}.merge(playback_options)
|
|
|
|
|
|
|
|
new(decorated_asciicast, PlaybackOptions.new(playback_options))
|
2014-01-18 13:53:15 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def initialize(asciicast, playback_options)
|
|
|
|
@asciicast = asciicast
|
|
|
|
@playback_options = playback_options
|
|
|
|
end
|
|
|
|
|
|
|
|
def asciicast_id
|
2015-04-26 15:40:38 +00:00
|
|
|
asciicast.to_param
|
2014-01-18 13:53:15 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|