Class: RubyCoded::Commands::MarkdownProvider
- Inherits:
-
Object
- Object
- RubyCoded::Commands::MarkdownProvider
- Defined in:
- lib/ruby_coded/commands/markdown_provider.rb
Overview
Converts markdown command files into command definitions.
Instance Method Summary collapse
- #definitions ⇒ Object
-
#initialize(project_root:) ⇒ MarkdownProvider
constructor
A new instance of MarkdownProvider.
- #load_report ⇒ Object
Constructor Details
#initialize(project_root:) ⇒ MarkdownProvider
Returns a new instance of MarkdownProvider.
10 11 12 |
# File 'lib/ruby_coded/commands/markdown_provider.rb', line 10 def initialize(project_root:) @loader = MarkdownLoader.new(project_root: project_root) end |
Instance Method Details
#definitions ⇒ Object
14 15 16 |
# File 'lib/ruby_coded/commands/markdown_provider.rb', line 14 def definitions load_report[:definitions] end |
#load_report ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/ruby_coded/commands/markdown_provider.rb', line 18 def load_report report = @loader.load_report { definitions: build_definitions(report[:entries]), invalid_count: report[:invalid_count], invalid_files: report[:invalid_files] } end |