Method: Munge::Item#initialize

Defined in:
lib/munge/item.rb

#initialize(type:, relpath:, id:, content: nil, frontmatter: {}, stat: nil) ⇒ Item

Returns a new instance of Item.



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/munge/item.rb', line 4

def initialize(type:,
               relpath:,
               id:,
               content: nil,
               frontmatter: {},
               stat: nil)
  @type = type
  @relpath = relpath
  @id = id
  @content = content
  @frontmatter = Munge::Util::SymbolHash.deep_convert(frontmatter)
  @stat = stat

  @route = nil
  @layout = nil
  @transforms = []
end