Class: Script::Trigger
- Inherits:
-
Object
- Object
- Script::Trigger
- Defined in:
- lib/script.rb,
lib/plugins/watch.rb,
lib/plugins/mercurial.rb
Overview
in TopLevel
Instance Method Summary collapse
- #doit ⇒ Object
-
#initialize(toplevel, &block) ⇒ Trigger
constructor
A new instance of Trigger.
-
#interval(n, &block) ⇒ Object
————————————————————— DSL.
- #mercurial(repository, &block) ⇒ Object
- #watch(filename, &block) ⇒ Object
Constructor Details
#initialize(toplevel, &block) ⇒ Trigger
Returns a new instance of Trigger.
34 35 36 37 |
# File 'lib/script.rb', line 34 def initialize(toplevel, &block) @toplevel = toplevel instance_eval(&block) end |
Instance Method Details
#doit ⇒ Object
39 40 41 |
# File 'lib/script.rb', line 39 def doit @crawler.doit end |
#interval(n, &block) ⇒ Object
DSL
45 46 47 |
# File 'lib/script.rb', line 45 def interval(n, &block) @crawler = Interval.new(@toplevel, n, &block) end |