Class: KBSecret::Record::Unstructured

Inherits:
Abstract
  • Object
show all
Defined in:
lib/kbsecret/record/unstructured.rb

Overview

Represents a record containing unstructured text.

Instance Attribute Summary

Attributes inherited from Abstract

#data, #label, #path, #session, #timestamp, #type

Instance Method Summary collapse

Methods inherited from Abstract

data_field, data_fields, gen_methods, #initialize_from_hash, load!, #sync!, #to_h, #to_s, type

Constructor Details

#initialize(session, label, text) ⇒ Unstructured

Returns a new instance of Unstructured.

Parameters:

  • session (Session)

    the session to associate with

  • label (Symbol)

    the new record's label

  • text (String)

    the new record's unstructured text



12
13
14
15
16
17
18
19
20
# File 'lib/kbsecret/record/unstructured.rb', line 12

def initialize(session, label, text)
  super(session, label)

  @data = {
    unstructured: {
      text: text,
    },
  }
end