class RKit::Parser::Base

Attributes

frame[RW]
raw[RW]

Public Class Methods

new(md_path, frame:;) click to toggle source
# File lib/r_kit/parser/base.rb, line 9
def initialize md_path, frame:;
  @raw = File.open(md_path).read
  @frame = frame
end
parse(md_path, frame:;) click to toggle source
# File lib/r_kit/parser/base.rb, line 3
def self.parse md_path, frame:;
  new(md_path, frame: frame).parse
end

Public Instance Methods

parse() click to toggle source
# File lib/r_kit/parser/base.rb, line 15
def parse
  RKit::Parser::Tree.new(raw, tag: :document, frame: frame).parsed
end