Class: Guard::Annotate
- Inherits:
-
Plugin
- Object
- Plugin
- Guard::Annotate
- Defined in:
- lib/guard/annotate.rb,
lib/guard/annotate/notifier.rb
Defined Under Namespace
Classes: Notifier
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Annotate
constructor
A new instance of Annotate.
- #reload ⇒ Object
- #run_all ⇒ Object
- #run_on_changes(paths = []) ⇒ Object (also: #run_on_change)
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Annotate
Returns a new instance of Annotate.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/guard/annotate.rb', line 10 def initialize(={}) super [:notify] = true if [:notify].nil? [:position] = 'before' if [:position].nil? [:tests] = false if [:tests].nil? [:factories] = true if [:factories].nil? [:serializers] = true if [:serializers].nil? [:sort] = false if [:sort].nil? [:routes] = false if [:routes].nil? [:run_at_start] = true if [:run_at_start].nil? [:show_indexes] = false if [:show_indexes].nil? [:simple_indexes] = false if [:simple_indexes].nil? [:show_foreign_keys] = false if [:show_foreign_keys].nil? [:show_migration] = false if [:show_migration].nil? [:format] = nil if [:format].nil? or not [:bare, :markdown, :rdoc].include? [:format].to_sym end |
Instance Method Details
#reload ⇒ Object
36 37 38 |
# File 'lib/guard/annotate.rb', line 36 def reload run_annotate if [:run_at_start] end |
#run_all ⇒ Object
40 41 42 |
# File 'lib/guard/annotate.rb', line 40 def run_all true end |
#run_on_changes(paths = []) ⇒ Object Also known as: run_on_change
44 45 46 |
# File 'lib/guard/annotate.rb', line 44 def run_on_changes(paths=[]) run_annotate end |
#start ⇒ Object
28 29 30 |
# File 'lib/guard/annotate.rb', line 28 def start run_annotate if [:run_at_start] end |
#stop ⇒ Object
32 33 34 |
# File 'lib/guard/annotate.rb', line 32 def stop true end |