Class: Valkyrie::Persistence::Fedora::OrderedList::Sentinel

Inherits:
Object
  • Object
show all
Defined in:
lib/valkyrie/persistence/fedora/ordered_list.rb

Overview

Class modeling sentinels within the linked list

Direct Known Subclasses

HeadSentinel, TailSentinel

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent, next_node: nil, prev_node: nil) ⇒ Sentinel

Returns a new instance of Sentinel.

Parameters:



136
137
138
139
140
# File 'lib/valkyrie/persistence/fedora/ordered_list.rb', line 136

def initialize(parent, next_node: nil, prev_node: nil)
  @parent = parent
  @next = next_node
  @prev = prev_node
end

Instance Attribute Details

#nextObject

Returns the value of attribute next.



130
131
132
# File 'lib/valkyrie/persistence/fedora/ordered_list.rb', line 130

def next
  @next
end

#parentObject (readonly)

Returns the value of attribute parent.



130
131
132
# File 'lib/valkyrie/persistence/fedora/ordered_list.rb', line 130

def parent
  @parent
end

#prevObject

Returns the value of attribute prev.



130
131
132
# File 'lib/valkyrie/persistence/fedora/ordered_list.rb', line 130

def prev
  @prev
end

Instance Method Details

#nil?TrueClass

Ensure that this always behaves like a NilClass

Returns:

  • (TrueClass)


144
145
146
# File 'lib/valkyrie/persistence/fedora/ordered_list.rb', line 144

def nil?
  true
end

#rdf_subjectNilClass

Ensure that this does not have a URI

Returns:

  • (NilClass)


150
151
152
# File 'lib/valkyrie/persistence/fedora/ordered_list.rb', line 150

def rdf_subject
  nil
end