Class: CommunityTheatre::Projector
- Inherits:
-
Object
- Object
- CommunityTheatre::Projector
- Defined in:
- lib/community_theatre/projector.rb
Instance Method Summary collapse
-
#initialize(spooler, path_base) ⇒ Projector
constructor
A new instance of Projector.
- #process(item) ⇒ Object
- #project!(starting_at = 0) ⇒ Object
- #projector_dir_path(*args) ⇒ Object
- #setup ⇒ Object
- #teardown ⇒ Object
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 |
#setup ⇒ Object
12 |
# File 'lib/community_theatre/projector.rb', line 12 def setup; end |
#teardown ⇒ Object
14 |
# File 'lib/community_theatre/projector.rb', line 14 def teardown; end |