Class: Fog::Brightbox::LinkHelper
- Inherits:
-
Object
- Object
- Fog::Brightbox::LinkHelper
- Defined in:
- lib/fog/brightbox/link_helper.rb
Overview
Rough implementation to extract Brightbox identifiers from RFC5988 Link headers
Instance Method Summary collapse
- #identifier ⇒ Object
-
#initialize(header) ⇒ LinkHelper
constructor
A new instance of LinkHelper.
- #uri ⇒ Object
Constructor Details
#initialize(header) ⇒ LinkHelper
Returns a new instance of LinkHelper.
9 10 11 12 |
# File 'lib/fog/brightbox/link_helper.rb', line 9 def initialize(header) @header = header @parsed = false end |
Instance Method Details
#identifier ⇒ Object
14 15 16 17 |
# File 'lib/fog/brightbox/link_helper.rb', line 14 def identifier parse unless @parsed uri.path.split("/")[3] end |
#uri ⇒ Object
19 20 21 22 |
# File 'lib/fog/brightbox/link_helper.rb', line 19 def uri parse unless @parsed URI.parse(@link) end |