Class: Kreuzberg::Result::DjotContent::Footnote

Inherits:
Object
  • Object
show all
Defined in:
lib/kreuzberg/djot_content.rb

Overview

Represents a footnote in Djot content

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(label:, content:) ⇒ Footnote

Returns a new instance of Footnote.



127
128
129
130
# File 'lib/kreuzberg/djot_content.rb', line 127

def initialize(label:, content:)
  @label = label
  @content = content
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



125
126
127
# File 'lib/kreuzberg/djot_content.rb', line 125

def content
  @content
end

#labelObject (readonly)

Returns the value of attribute label.



125
126
127
# File 'lib/kreuzberg/djot_content.rb', line 125

def label
  @label
end

Instance Method Details

#to_hObject



132
133
134
135
136
137
# File 'lib/kreuzberg/djot_content.rb', line 132

def to_h
  {
    label: @label,
    content: @content
  }
end