Class: Specdown::ImplicitParser

Inherits:
Object
  • Object
show all
Defined in:
lib/specdown/implicit_parser.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*implicit_specifications) ⇒ ImplicitParser

Returns a new instance of ImplicitParser.



7
8
9
10
# File 'lib/specdown/implicit_parser.rb', line 7

def initialize(*implicit_specifications)
  @specs = implicit_specifications
  @lookups = {}
end

Class Method Details

.parse(*implicit_specifications) ⇒ Object



3
4
5
# File 'lib/specdown/implicit_parser.rb', line 3

def self.parse(*implicit_specifications)
  self.new(*implicit_specifications).parse
end

Instance Method Details

#parseObject



12
13
14
15
16
17
18
19
# File 'lib/specdown/implicit_parser.rb', line 12

def parse
  @specs.each do |spec|
    kramdown = Kramdown::Document.new spec, :input => "GithubMarkdown"
    build_lookup kramdown.root.children
  end

  @lookups
end