Class: ActiveFedora::Orders::ListNode::MaybeID
- Inherits:
-
Object
- Object
- ActiveFedora::Orders::ListNode::MaybeID
- Defined in:
- lib/active_fedora/orders/list_node.rb
Overview
Returns an ID whether or not the given value is a URI.
Instance Attribute Summary collapse
-
#uri_or_id ⇒ Object
readonly
Returns the value of attribute uri_or_id.
Instance Method Summary collapse
-
#initialize(uri_or_id) ⇒ MaybeID
constructor
A new instance of MaybeID.
- #value ⇒ Object
Constructor Details
#initialize(uri_or_id) ⇒ MaybeID
Returns a new instance of MaybeID.
86 87 88 |
# File 'lib/active_fedora/orders/list_node.rb', line 86 def initialize(uri_or_id) @uri_or_id = uri_or_id end |
Instance Attribute Details
#uri_or_id ⇒ Object (readonly)
Returns the value of attribute uri_or_id.
85 86 87 |
# File 'lib/active_fedora/orders/list_node.rb', line 85 def uri_or_id @uri_or_id end |
Instance Method Details
#value ⇒ Object
90 91 92 |
# File 'lib/active_fedora/orders/list_node.rb', line 90 def value id_composite.new([uri_or_id], translator).to_a.first end |