Class: JekyllRPG::Edge

Inherits:
Object
  • Object
show all
Defined in:
lib/edge.rb

Overview

Edge between two documents

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(referent, reference) ⇒ Edge

Returns a new instance of Edge.



8
9
10
11
# File 'lib/edge.rb', line 8

def initialize(referent, reference)
  @referent = referent
  @reference = reference
end

Instance Attribute Details

#referenceObject

Returns the value of attribute reference.



6
7
8
# File 'lib/edge.rb', line 6

def reference
  @reference
end

#referentObject

Returns the value of attribute referent.



6
7
8
# File 'lib/edge.rb', line 6

def referent
  @referent
end

Instance Method Details

#hashObject



13
14
15
16
17
18
# File 'lib/edge.rb', line 13

def hash
  {
    'reference' => reference.hash,
    'referent' => referent.hash
  }
end