Class: TimeBlock::Agent
- Inherits:
-
Object
- Object
- TimeBlock::Agent
- Defined in:
- lib/time_block/agent.rb
Instance Method Summary collapse
-
#initialize(time) ⇒ Agent
constructor
A new instance of Agent.
- #run ⇒ Object
Constructor Details
#initialize(time) ⇒ Agent
Returns a new instance of Agent.
5 6 7 8 |
# File 'lib/time_block/agent.rb', line 5 def initialize(time) raise 'No terminal-notifier, please install it, brew install terminal-notifier' unless terminal_notifier_exist? @time = time end |
Instance Method Details
#run ⇒ Object
10 11 12 13 14 |
# File 'lib/time_block/agent.rb', line 10 def run pre_callback sleep @time post_callback end |