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.
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
#next ⇒ Object
Returns the value of attribute next.
132 133 134 |
# File 'lib/valkyrie/persistence/fedora/ordered_list.rb', line 132 def next @next end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
132 133 134 |
# File 'lib/valkyrie/persistence/fedora/ordered_list.rb', line 132 def parent @parent end |
#prev ⇒ Object
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
146 147 148 |
# File 'lib/valkyrie/persistence/fedora/ordered_list.rb', line 146 def nil? true end |
#rdf_subject ⇒ NilClass
Ensure that this does not have a URI
152 153 154 |
# File 'lib/valkyrie/persistence/fedora/ordered_list.rb', line 152 def rdf_subject nil end |