Class: RubyCoded::Commands::MarkdownLoader
- Inherits:
-
Object
- Object
- RubyCoded::Commands::MarkdownLoader
- Defined in:
- lib/ruby_coded/commands/markdown_loader.rb
Overview
Loads project-local markdown command files.
Instance Method Summary collapse
-
#initialize(project_root:) ⇒ MarkdownLoader
constructor
A new instance of MarkdownLoader.
- #load_files ⇒ Object
- #load_report ⇒ Object
Constructor Details
#initialize(project_root:) ⇒ MarkdownLoader
Returns a new instance of MarkdownLoader.
9 10 11 |
# File 'lib/ruby_coded/commands/markdown_loader.rb', line 9 def initialize(project_root:) @project_root = project_root end |
Instance Method Details
#load_files ⇒ Object
13 14 15 |
# File 'lib/ruby_coded/commands/markdown_loader.rb', line 13 def load_files load_report[:entries] end |
#load_report ⇒ Object
17 18 19 20 21 |
# File 'lib/ruby_coded/commands/markdown_loader.rb', line 17 def load_report return empty_report unless Dir.exist?(commands_dir) build_report(command_paths) end |