Class: Gitlab::WikiPages::FrontMatterParser::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/wiki_pages/front_matter_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content:, front_matter: {}, reason: nil, error: nil) ⇒ Result

Returns a new instance of Result.



24
25
26
27
28
29
# File 'lib/gitlab/wiki_pages/front_matter_parser.rb', line 24

def initialize(content:, front_matter: {}, reason: nil, error: nil)
  @content      = content
  @front_matter = front_matter.freeze
  @reason       = reason
  @error        = error
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



22
23
24
# File 'lib/gitlab/wiki_pages/front_matter_parser.rb', line 22

def content
  @content
end

#errorObject (readonly)

Returns the value of attribute error.



22
23
24
# File 'lib/gitlab/wiki_pages/front_matter_parser.rb', line 22

def error
  @error
end

#front_matterObject (readonly)

Returns the value of attribute front_matter.



22
23
24
# File 'lib/gitlab/wiki_pages/front_matter_parser.rb', line 22

def front_matter
  @front_matter
end

#reasonObject (readonly)

Returns the value of attribute reason.



22
23
24
# File 'lib/gitlab/wiki_pages/front_matter_parser.rb', line 22

def reason
  @reason
end