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/serializers/asciicast_serializer.rb

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