Class: Rafflesia::OntologyContextDocument

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/ontology/ontology_context_document.rb

Constant Summary collapse

HASH_ATTRS =
{
  character_count: :character_count,
  estimated_tokens: :estimated_tokens,
  id: :id,
  markdown: :markdown,
  object: :object,
  relation: :relation
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ OntologyContextDocument

Returns a new instance of OntologyContextDocument.



25
26
27
28
29
30
31
32
33
34
# File 'lib/rafflesia/ontology/ontology_context_document.rb', line 25

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @character_count = hash[:character_count]
  @estimated_tokens = hash[:estimated_tokens]
  @id = hash[:id]
  @markdown = hash[:markdown]
  @object = hash[:object]
  @relation = hash[:relation]
end

Instance Attribute Details

#character_countObject

Returns the value of attribute character_count.



17
18
19
# File 'lib/rafflesia/ontology/ontology_context_document.rb', line 17

def character_count
  @character_count
end

#estimated_tokensObject

Returns the value of attribute estimated_tokens.



17
18
19
# File 'lib/rafflesia/ontology/ontology_context_document.rb', line 17

def estimated_tokens
  @estimated_tokens
end

#idObject

Returns the value of attribute id.



17
18
19
# File 'lib/rafflesia/ontology/ontology_context_document.rb', line 17

def id
  @id
end

#markdownObject

Returns the value of attribute markdown.



17
18
19
# File 'lib/rafflesia/ontology/ontology_context_document.rb', line 17

def markdown
  @markdown
end

#objectObject

Returns the value of attribute object.



17
18
19
# File 'lib/rafflesia/ontology/ontology_context_document.rb', line 17

def object
  @object
end

#relationObject

Returns the value of attribute relation.



17
18
19
# File 'lib/rafflesia/ontology/ontology_context_document.rb', line 17

def relation
  @relation
end