Class: Docit::SystemGraph::Edge
- Inherits:
-
Object
- Object
- Docit::SystemGraph::Edge
- Defined in:
- lib/docit/system_graph/edge.rb
Instance Attribute Summary collapse
-
#confidence ⇒ Object
readonly
Returns the value of attribute confidence.
-
#evidence ⇒ Object
readonly
Returns the value of attribute evidence.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(id:, source:, target:, type:, confidence:, evidence:) ⇒ Edge
constructor
A new instance of Edge.
- #to_h ⇒ Object
Constructor Details
#initialize(id:, source:, target:, type:, confidence:, evidence:) ⇒ Edge
Returns a new instance of Edge.
8 9 10 11 12 13 14 15 |
# File 'lib/docit/system_graph/edge.rb', line 8 def initialize(id:, source:, target:, type:, confidence:, evidence:) @id = id.to_s @source = source.to_s @target = target.to_s @type = type.to_s @confidence = confidence.to_s @evidence = evidence.to_s end |
Instance Attribute Details
#confidence ⇒ Object (readonly)
Returns the value of attribute confidence.
6 7 8 |
# File 'lib/docit/system_graph/edge.rb', line 6 def confidence @confidence end |
#evidence ⇒ Object (readonly)
Returns the value of attribute evidence.
6 7 8 |
# File 'lib/docit/system_graph/edge.rb', line 6 def evidence @evidence end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/docit/system_graph/edge.rb', line 6 def id @id end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
6 7 8 |
# File 'lib/docit/system_graph/edge.rb', line 6 def source @source end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
6 7 8 |
# File 'lib/docit/system_graph/edge.rb', line 6 def target @target end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/docit/system_graph/edge.rb', line 6 def type @type end |
Instance Method Details
#to_h ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/docit/system_graph/edge.rb', line 17 def to_h { id: id, source: source, target: target, type: type, confidence: confidence, evidence: evidence } end |