Class: Aaron::DSL
- Inherits:
-
Object
- Object
- Aaron::DSL
- Defined in:
- lib/aaron/dsl.rb
Instance Attribute Summary collapse
-
#scheduler ⇒ Object
readonly
Returns the value of attribute scheduler.
Instance Method Summary collapse
- #every(range, proc = nil, &block) ⇒ Object
- #exec(&block) ⇒ Object
-
#initialize ⇒ DSL
constructor
A new instance of DSL.
Constructor Details
Instance Attribute Details
#scheduler ⇒ Object (readonly)
Returns the value of attribute scheduler.
5 6 7 |
# File 'lib/aaron/dsl.rb', line 5 def scheduler @scheduler end |
Instance Method Details
#every(range, proc = nil, &block) ⇒ Object
11 12 13 14 |
# File 'lib/aaron/dsl.rb', line 11 def every range, proc = nil, &block scheduler << Task.new(range, proc, &block) scheduler end |
#exec(&block) ⇒ Object
16 17 18 19 |
# File 'lib/aaron/dsl.rb', line 16 def exec &block block.type = :exec block end |