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.
85 86 87 |
# File 'lib/active_fedora/orders/list_node.rb', line 85 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.
84 85 86 |
# File 'lib/active_fedora/orders/list_node.rb', line 84 def uri_or_id @uri_or_id end |
Instance Method Details
#value ⇒ Object
89 90 91 |
# File 'lib/active_fedora/orders/list_node.rb', line 89 def value id_composite.new([uri_or_id], translator).to_a.first end |