Class: AnnotateRb::RouteAnnotator::Annotator
- Inherits:
-
Object
- Object
- AnnotateRb::RouteAnnotator::Annotator
- Defined in:
- lib/annotate_rb/route_annotator/annotator.rb
Class Method Summary collapse
- .add_annotations(options = {}) ⇒ Object
-
.do_annotations(options = {}) ⇒ Object
TODO: Deprecate.
- .remove_annotations(options = {}) ⇒ Object
Instance Method Summary collapse
- #add_annotations ⇒ Object
-
#initialize(options = {}) ⇒ Annotator
constructor
A new instance of Annotator.
- #remove_annotations ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Annotator
Returns a new instance of Annotator.
21 22 23 |
# File 'lib/annotate_rb/route_annotator/annotator.rb', line 21 def initialize( = {}) @options = end |
Class Method Details
.add_annotations(options = {}) ⇒ Object
12 13 14 |
# File 'lib/annotate_rb/route_annotator/annotator.rb', line 12 def add_annotations( = {}) new().add_annotations end |
.do_annotations(options = {}) ⇒ Object
TODO: Deprecate
8 9 10 |
# File 'lib/annotate_rb/route_annotator/annotator.rb', line 8 def do_annotations( = {}) add_annotations() end |
.remove_annotations(options = {}) ⇒ Object
16 17 18 |
# File 'lib/annotate_rb/route_annotator/annotator.rb', line 16 def remove_annotations( = {}) new().remove_annotations end |
Instance Method Details
#add_annotations ⇒ Object
25 26 27 28 29 30 |
# File 'lib/annotate_rb/route_annotator/annotator.rb', line 25 def add_annotations routes_file = File.join("config", "routes.rb") AnnotationProcessor.execute(@options, routes_file).tap do |result| puts result end end |
#remove_annotations ⇒ Object
32 33 34 35 36 37 |
# File 'lib/annotate_rb/route_annotator/annotator.rb', line 32 def remove_annotations routes_file = File.join("config", "routes.rb") RemovalProcessor.execute(@options, routes_file).tap do |result| puts result end end |