Class: Swagcov::Command::GenerateTodoFile
- Inherits:
-
Object
- Object
- Swagcov::Command::GenerateTodoFile
- Defined in:
- lib/swagcov/command/generate_todo_file.rb
Instance Method Summary collapse
-
#initialize(basename: ::Swagcov::TODOFILE, data: ::Swagcov::Coverage.new(dotfile: ::Swagcov::Dotfile.new(skip_todo: true)).collect[:uncovered]) ⇒ GenerateTodoFile
constructor
A new instance of GenerateTodoFile.
- #run ⇒ Object
Constructor Details
#initialize(basename: ::Swagcov::TODOFILE, data: ::Swagcov::Coverage.new(dotfile: ::Swagcov::Dotfile.new(skip_todo: true)).collect[:uncovered]) ⇒ GenerateTodoFile
Returns a new instance of GenerateTodoFile.
6 7 8 9 10 |
# File 'lib/swagcov/command/generate_todo_file.rb', line 6 def initialize basename: ::Swagcov::TODOFILE, data: ::Swagcov::Coverage.new(dotfile: ::Swagcov::Dotfile.new(skip_todo: true)).collect[:uncovered] @dotfile = ::Swagcov.project_root.join(basename) @data = data end |
Instance Method Details
#run ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/swagcov/command/generate_todo_file.rb', line 12 def run ::File.write( @dotfile, " # This configuration was auto generated\n # The intent is to remove these route configurations as documentation is added\n \#{routes_yaml}\n YAML\n )\n\n $stdout.puts \"created \#{@dotfile.basename} at \#{@dotfile.dirname}\"\n\n ::Swagcov::STATUS_SUCCESS\nend\n" |