Class: Specdown::Parser
- Inherits:
-
Object
- Object
- Specdown::Parser
- Defined in:
- lib/specdown/parser.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(readme, lookups = {}) ⇒ Parser
constructor
A new instance of Parser.
- #parse ⇒ Object
Constructor Details
#initialize(readme, lookups = {}) ⇒ Parser
Returns a new instance of Parser.
7 8 9 10 |
# File 'lib/specdown/parser.rb', line 7 def initialize(readme, lookups={}) @readme = readme @lookups = lookups end |
Class Method Details
.parse(readme, lookups = {}) ⇒ Object
3 4 5 |
# File 'lib/specdown/parser.rb', line 3 def self.parse(readme, lookups={}) self.new(readme, lookups).parse end |
Instance Method Details
#parse ⇒ Object
12 13 14 15 |
# File 'lib/specdown/parser.rb', line 12 def parse kramdown = Kramdown::Document.new @readme, :input => "GithubMarkdown" build_tree kramdown.root.children end |