lib/lookbook/preview_parser.rb in lookbook-1.5.5 vs lib/lookbook/preview_parser.rb in lookbook-2.0.0.beta.0

- old
+ new

@@ -10,15 +10,17 @@ define_tags(tags) YARD::Parser::SourceParser.after_parse_list { run_callbacks } end - def parse(&block) + def parse(files = nil, &block) unless @parsing @parsing = true @after_parse_once_callbacks << block if block + files_list = files ? files.select { |file| file.to_s.end_with?(".rb") } : paths + YARD::Registry.clear - YARD.parse(paths) + YARD.parse(files_list) end end def after_parse(&block) @after_parse_callbacks << block