class Spielbash::Movie
Attributes
actions[RW]
context[RW]
output_path[RW]
post_run_actions[RW]
pre_run_actions[RW]
session[RW]
title[RW]
Public Class Methods
new(title, pre_run_actions, actions, post_run_actions, context, output_path)
click to toggle source
# File lib/spielbash/model/movie.rb, line 5 def initialize(title, pre_run_actions, actions, post_run_actions, context, output_path) @title = title @pre_run_actions = pre_run_actions @actions = actions @post_run_actions = post_run_actions @context = context @output_path = output_path end
Public Instance Methods
interrupt()
click to toggle source
# File lib/spielbash/model/movie.rb, line 37 def interrupt Spielbash::PressKeyAction.new('C-c', context).execute(session) unless session.nil? end
shoot()
click to toggle source
# File lib/spielbash/model/movie.rb, line 14 def shoot session = Spielbash::Session.new(title.downcase.split.join('_'), output_path, context) session.new_session pre_run_actions.each do |action| action.execute(session) end session.start_recording actions.each do |action| action.execute(session) end session.stop_recording post_run_actions.each do |action| action.execute(session) end session.close_session end