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:


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

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


132
133
134
# File 'lib/valkyrie/persistence/fedora/ordered_list.rb', line 132

def next
  @next
end

#parentObject (readonly)

Returns the value of attribute parent


132
133
134
# File 'lib/valkyrie/persistence/fedora/ordered_list.rb', line 132

def parent
  @parent
end

#prevObject

Returns the value of attribute prev


132
133
134
# File 'lib/valkyrie/persistence/fedora/ordered_list.rb', line 132

def prev
  @prev
end

Instance Method Details

#nil?TrueClass

Ensure that this always behaves like a NilClass

Returns:

  • (TrueClass)

146
147
148
# File 'lib/valkyrie/persistence/fedora/ordered_list.rb', line 146

def nil?
  true
end

#rdf_subjectNilClass

Ensure that this does not have a URI

Returns:

  • (NilClass)

152
153
154
# File 'lib/valkyrie/persistence/fedora/ordered_list.rb', line 152

def rdf_subject
  nil
end