Class: RobotLab::Durable::Entry
- Inherits:
-
Data
- Object
- Data
- RobotLab::Durable::Entry
- Defined in:
- lib/robot_lab/durable/entry.rb
Instance Attribute Summary collapse
-
#category ⇒ Object
readonly
Returns the value of attribute category.
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#node_id ⇒ Object
readonly
Returns the value of attribute node_id.
-
#reasoning ⇒ Object
readonly
Returns the value of attribute reasoning.
Class Method Summary collapse
Instance Attribute Details
#category ⇒ Object (readonly)
Returns the value of attribute category
5 6 7 |
# File 'lib/robot_lab/durable/entry.rb', line 5 def category @category end |
#content ⇒ Object (readonly)
Returns the value of attribute content
5 6 7 |
# File 'lib/robot_lab/durable/entry.rb', line 5 def content @content end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at
5 6 7 |
# File 'lib/robot_lab/durable/entry.rb', line 5 def created_at @created_at end |
#node_id ⇒ Object (readonly)
Returns the value of attribute node_id
5 6 7 |
# File 'lib/robot_lab/durable/entry.rb', line 5 def node_id @node_id end |
#reasoning ⇒ Object (readonly)
Returns the value of attribute reasoning
5 6 7 |
# File 'lib/robot_lab/durable/entry.rb', line 5 def reasoning @reasoning end |
Class Method Details
.from_node(node) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/robot_lab/durable/entry.rb', line 6 def self.from_node(node) = node['metadata'] || {} new( node_id: node['id'], content: node['content'], reasoning: ['reasoning'], category: (['category'] || 'fact').to_sym, created_at: node['created_at'] ) end |