Class: WhatTheGem::Changes::RDocParser
- Defined in:
- lib/whatthegem/changes/rdoc_parser.rb
Overview
FIXME: It kinda duplicates MarkdownParser for the logic, so should be unified somehow?
Instance Attribute Summary
Attributes inherited from Parser
Instance Method Summary collapse
Methods inherited from Parser
Methods included from I::Callable
Constructor Details
This class inherits a constructor from WhatTheGem::Changes::Parser
Instance Method Details
#versions ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/whatthegem/changes/rdoc_parser.rb', line 5 def versions nodes = I::RDocs.parts(content) level = detect_version_level(nodes) # find level of headers which contain version sections = sections(nodes, level) .select { |title,| title.match?(VERSION_LINE_REGEXP) } .map(&method(:make_version)) .sort_by(&:number) # it is internally converted to Gem::Version, so "1.12" is correctly > "1.2" end |