class WhatTheGem::Changes::Parser
Attributes
file[R]
Public Class Methods
call(file)
click to toggle source
# File lib/whatthegem/changes/parser.rb, line 7 def call(file) parser_for(file).versions end
new(file)
click to toggle source
# File lib/whatthegem/changes/parser.rb, line 24 def initialize(file) @file = file end
parser_for(file)
click to toggle source
# File lib/whatthegem/changes/parser.rb, line 11 def parser_for(file) case file.basename when /\.(md|markdown)$/i MarkdownParser.new(file) else # Most of the time in Ruby-land, when no extension it is RDoc or RDoc-alike RDocParser.new(file) end end
Public Instance Methods
versions()
click to toggle source
# File lib/whatthegem/changes/parser.rb, line 28 def versions fail NotImplementedError end
Private Instance Methods
content()
click to toggle source
# File lib/whatthegem/changes/parser.rb, line 34 def content file.read end