Class: Sitepress::Parsers::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/sitepress/parsers/base.rb

Overview

Parses nothing. The body is returned and the data is blank.

Direct Known Subclasses

Frontmatter, Notion

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source) ⇒ Base

Returns a new instance of Base.



9
10
11
12
# File 'lib/sitepress/parsers/base.rb', line 9

def initialize(source)
  @body = source
  @data = {}
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



7
8
9
# File 'lib/sitepress/parsers/base.rb', line 7

def body
  @body
end

#dataObject (readonly)

Returns the value of attribute data.



7
8
9
# File 'lib/sitepress/parsers/base.rb', line 7

def data
  @data
end