module Castaway::Production::Scenes
Public Instance Methods
_build_scenes()
click to toggle source
# File lib/castaway/production/scenes.rb, line 25 def _build_scenes @scenes = self.class.scenes.map do |(name, config)| Castaway::Scene.new(name, self).configure(&config) end @scenes = @scenes.sort_by(&:start) @scenes.each.with_index do |scene, index| scene.update_from_next(@scenes[index + 1]) end end
duration()
click to toggle source
Returns the duration of the production, in seconds.
# File lib/castaway/production/scenes.rb, line 8 def duration @scenes.last.finish end
pointers()
click to toggle source
# File lib/castaway/production/scenes.rb, line 21 def pointers self.class.pointers end
resource(name)
click to toggle source
# File lib/castaway/production/scenes.rb, line 17 def resource(name) self.class.resource(name) end
scene(title)
click to toggle source
Returns the first scene with the given title.
# File lib/castaway/production/scenes.rb, line 13 def scene(title) @scenes.find { |s| s.title == title } end