asciinema.org/app/services/asciicast_creator.rb
2013-10-11 20:44:49 +02:00

12 lines
267 B
Ruby

class AsciicastCreator
def create(attributes, headers)
attributes = AsciicastParams.new(attributes, headers).to_h
asciicast = Asciicast.create!(attributes, without_protection: true)
AsciicastWorker.perform_async(asciicast.id)
asciicast
end
end