You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
asciinema.org/app/presenters/snapshot_line_presenter.rb

20 lines
348 B
Ruby

class SnapshotLinePresenter < Draper::Decorator
delegate :map
def to_html
h.content_tag(:span, fragment_strings.html_safe, :class => 'line')
end
private
def fragment_strings
map { |fragment| fragment_string(fragment) }.join
end
def fragment_string(fragment)
SnapshotFragmentPresenter.new(fragment).to_html
end
end