Class | Guard::Interactor |
In: |
lib/guard/interactor.rb
|
Parent: | Object |
The interactor reads user input and triggers specific action upon them unless its locked.
Currently the following actions are implemented:
It‘s also possible to scope `reload` and `run all` actions to only a specified group or a guard.
@example `backend reload` will only reload backend group @example `spork reload` will only reload rspec guard @example `jasmine` will only run all jasmine specs
STOP_ACTIONS | = | %w[stop quit exit s q e] |
RELOAD_ACTIONS | = | %w[reload r z] |
PAUSE_ACTIONS | = | %w[pause p] |
Extract action from entry if an existing action is present
@param [String] Interactor entry gets from $stdin @return [Symbol] A guard action
Extract guard or group scope and action from Interactor entry
@example `spork reload` will only reload rspec @example `jasmine` will only run all jasmine specs
@param [String] Interactor entry gets from $stdin @return [Array] entry group or guard scope hash and action
Extract guard or group scope from entry if valid
@param [String] Interactor entry gets from $stdin @return [Hash] An hash with a guard or a group scope