Class: CommunityTheatre::Projector

Inherits:
Object
  • Object
show all
Defined in:
lib/community_theatre/projector.rb

Instance Method Summary collapse

Constructor Details

#initialize(spooler, path_base) ⇒ Projector

Returns a new instance of Projector.



3
4
5
6
# File 'lib/community_theatre/projector.rb', line 3

def initialize(spooler, path_base)
  @spooler = spooler
  @path_base = path_base
end

Instance Method Details

#process(item) ⇒ Object



16
# File 'lib/community_theatre/projector.rb', line 16

def process(item); end

#project!(starting_at = 0) ⇒ Object



18
19
20
21
22
23
24
# File 'lib/community_theatre/projector.rb', line 18

def project!(starting_at = 0)
  setup

  @spooler.unspool(starting_at).each(&method(:process))

  teardown
end

#projector_dir_path(*args) ⇒ Object



8
9
10
# File 'lib/community_theatre/projector.rb', line 8

def projector_dir_path(*args)
  File.join(@path_base, *args)
end

#setupObject



12
# File 'lib/community_theatre/projector.rb', line 12

def setup; end

#teardownObject



14
# File 'lib/community_theatre/projector.rb', line 14

def teardown; end