Class: Rafflesia::OntologyContextDocument
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::OntologyContextDocument
- 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
-
#character_count ⇒ Object
Returns the value of attribute character_count.
-
#estimated_tokens ⇒ Object
Returns the value of attribute estimated_tokens.
-
#id ⇒ Object
Returns the value of attribute id.
-
#markdown ⇒ Object
Returns the value of attribute markdown.
-
#object ⇒ Object
Returns the value of attribute object.
-
#relation ⇒ Object
Returns the value of attribute relation.
Instance Method Summary collapse
-
#initialize(json) ⇒ OntologyContextDocument
constructor
A new instance of OntologyContextDocument.
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_count ⇒ Object
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_tokens ⇒ Object
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 |
#id ⇒ Object
Returns the value of attribute id.
17 18 19 |
# File 'lib/rafflesia/ontology/ontology_context_document.rb', line 17 def id @id end |
#markdown ⇒ Object
Returns the value of attribute markdown.
17 18 19 |
# File 'lib/rafflesia/ontology/ontology_context_document.rb', line 17 def markdown @markdown end |
#object ⇒ Object
Returns the value of attribute object.
17 18 19 |
# File 'lib/rafflesia/ontology/ontology_context_document.rb', line 17 def object @object end |
#relation ⇒ Object
Returns the value of attribute relation.
17 18 19 |
# File 'lib/rafflesia/ontology/ontology_context_document.rb', line 17 def relation @relation end |