Class: WhatTheGem::Changes::Parser
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
to_proc
Constructor Details
#initialize(file) ⇒ Parser
24
25
26
|
# File 'lib/whatthegem/changes/parser.rb', line 24
def initialize(file)
@file = file
end
|
Instance Attribute Details
Returns the value of attribute file.
22
23
24
|
# File 'lib/whatthegem/changes/parser.rb', line 22
def file
@file
end
|
Class Method Details
.call(file) ⇒ Object
7
8
9
|
# File 'lib/whatthegem/changes/parser.rb', line 7
def call(file)
parser_for(file).versions
end
|
.parser_for(file) ⇒ Object
11
12
13
14
15
16
17
18
19
|
# File 'lib/whatthegem/changes/parser.rb', line 11
def parser_for(file)
case file.basename
when /\.(md|markdown)$/i
MarkdownParser.new(file)
else
RDocParser.new(file)
end
end
|