Class: Maglev::ContextPreview

Inherits:
Object
  • Object
show all
Defined in:
lib/maglev/context_preview.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text:, metadata:) ⇒ ContextPreview

Returns a new instance of ContextPreview.



7
8
9
10
11
# File 'lib/maglev/context_preview.rb', line 7

def initialize(text:, metadata:)
  @text = text
  @metadata = .freeze
  freeze
end

Instance Attribute Details

#metadataObject (readonly)

Returns the value of attribute metadata.



5
6
7
# File 'lib/maglev/context_preview.rb', line 5

def 
  @metadata
end

#textObject (readonly)

Returns the value of attribute text.



5
6
7
# File 'lib/maglev/context_preview.rb', line 5

def text
  @text
end