asciinema.org/app/serializers/asciicast_serializer.rb

17 lines
300 B
Ruby
Raw Normal View History

class AsciicastSerializer < ActiveModel::Serializer
self.root = false
2013-08-13 17:49:48 +00:00
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
2013-08-13 17:49:48 +00:00
end