Class: Ashikawa::Core::Edge
- Defined in:
- lib/ashikawa-core/edge.rb
Overview
A certain Edge within a certain Collection
Instance Attribute Summary collapse
-
#from_id ⇒ String
readonly
The ID of the ‘from’ document.
-
#to_id ⇒ String
readonly
The ID of the ‘to’ document.
Attributes inherited from Document
Instance Method Summary collapse
-
#initialize(_database, raw_edge, _additional_data = {}) ⇒ Edge
constructor
Initialize an Edge with the database and raw data.
Methods inherited from Document
#[], #[]=, #check_if_persisted, #delete, #refresh, #save, #to_h
Constructor Details
#initialize(_database, raw_edge, _additional_data = {}) ⇒ Edge
Initialize an Edge with the database and raw data
38 39 40 41 42 |
# File 'lib/ashikawa-core/edge.rb', line 38 def initialize(_database, raw_edge, _additional_data = {}) @from_id = raw_edge['_from'] @to_id = raw_edge['_to'] super end |
Instance Attribute Details
#from_id ⇒ String (readonly)
The ID of the ‘from’ document
18 19 20 |
# File 'lib/ashikawa-core/edge.rb', line 18 def from_id @from_id end |
#to_id ⇒ String (readonly)
The ID of the ‘to’ document
27 28 29 |
# File 'lib/ashikawa-core/edge.rb', line 27 def to_id @to_id end |