2013-09-20 21:21:25 +00:00
|
|
|
class AsciicastSerializer < ActiveModel::Serializer
|
|
|
|
self.root = false
|
2013-08-13 17:49:48 +00:00
|
|
|
|
2013-09-20 21:21:25 +00:00
|
|
|
attributes :id, :duration, :stdout_frames_url, :snapshot
|
|
|
|
attribute :terminal_columns, key: :width
|
|
|
|
attribute :terminal_lines, key: :height
|
2015-04-26 15:09:30 +00:00
|
|
|
|
2015-05-13 10:43:49 +00:00
|
|
|
def id
|
|
|
|
object.to_param
|
|
|
|
end
|
|
|
|
|
2015-04-26 15:09:30 +00:00
|
|
|
def private?
|
|
|
|
object.private?
|
|
|
|
end
|
|
|
|
|
2013-08-13 17:49:48 +00:00
|
|
|
end
|