Class: RevealCK::Commands::ListenToRebuildSlides
- Inherits:
-
Object
- Object
- RevealCK::Commands::ListenToRebuildSlides
- Defined in:
- lib/reveal-ck/commands/listen_to_rebuild_slides.rb
Overview
The idea of listening for file system changes and then rebuilding slides.
Instance Attribute Summary collapse
-
#rebuild_method ⇒ Object
readonly
Returns the value of attribute rebuild_method.
-
#ui ⇒ Object
readonly
Returns the value of attribute ui.
Instance Method Summary collapse
-
#initialize(ui, &block) ⇒ ListenToRebuildSlides
constructor
A new instance of ListenToRebuildSlides.
- #run ⇒ Object
Constructor Details
#initialize(ui, &block) ⇒ ListenToRebuildSlides
Returns a new instance of ListenToRebuildSlides.
9 10 11 |
# File 'lib/reveal-ck/commands/listen_to_rebuild_slides.rb', line 9 def initialize(ui, &block) @ui, @rebuild_method = ui, block end |
Instance Attribute Details
#rebuild_method ⇒ Object (readonly)
Returns the value of attribute rebuild_method.
8 9 10 |
# File 'lib/reveal-ck/commands/listen_to_rebuild_slides.rb', line 8 def rebuild_method @rebuild_method end |
#ui ⇒ Object (readonly)
Returns the value of attribute ui.
8 9 10 |
# File 'lib/reveal-ck/commands/listen_to_rebuild_slides.rb', line 8 def ui @ui end |
Instance Method Details
#run ⇒ Object
13 14 15 16 17 |
# File 'lib/reveal-ck/commands/listen_to_rebuild_slides.rb', line 13 def run ::Listen.to('.', ignore: ignored_files_regex) do |mod, add, del| (mod, add, del) end.start end |