Class: Valkyrie::Persistence::Fedora::OrderedList::Sentinel
- Inherits:
-
Object
- Object
- Valkyrie::Persistence::Fedora::OrderedList::Sentinel
- Defined in:
- lib/valkyrie/persistence/fedora/ordered_list.rb
Overview
Class modeling sentinels within the linked list
Direct Known Subclasses
Instance Attribute Summary collapse
-
#next ⇒ Object
Returns the value of attribute next.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
-
#prev ⇒ Object
Returns the value of attribute prev.
Instance Method Summary collapse
-
#initialize(parent, next_node: nil, prev_node: nil) ⇒ Sentinel
constructor
A new instance of Sentinel.
-
#nil? ⇒ TrueClass
Ensure that this always behaves like a NilClass.
-
#rdf_subject ⇒ NilClass
Ensure that this does not have a URI.
Constructor Details
#initialize(parent, next_node: nil, prev_node: nil) ⇒ Sentinel
Returns a new instance of Sentinel.
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
#next ⇒ Object
Returns the value of attribute next.
130 131 132 |
# File 'lib/valkyrie/persistence/fedora/ordered_list.rb', line 130 def next @next end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
130 131 132 |
# File 'lib/valkyrie/persistence/fedora/ordered_list.rb', line 130 def parent @parent end |
#prev ⇒ Object
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
144 145 146 |
# File 'lib/valkyrie/persistence/fedora/ordered_list.rb', line 144 def nil? true end |
#rdf_subject ⇒ NilClass
Ensure that this does not have a URI
150 151 152 |
# File 'lib/valkyrie/persistence/fedora/ordered_list.rb', line 150 def rdf_subject nil end |