asciinema.org/app/serializers/asciicast_serializer.rb
2015-05-13 10:43:49 +00:00

17 lines
300 B
Ruby

class AsciicastSerializer < ActiveModel::Serializer
self.root = false
attributes :id, :duration, :stdout_frames_url, :snapshot
attribute :terminal_columns, key: :width
attribute :terminal_lines, key: :height
def id
object.to_param
end
def private?
object.private?
end
end