Class: TentClient::LinkHeader
- Inherits:
-
Object
- Object
- TentClient::LinkHeader
- Defined in:
- lib/tent-client/link_header.rb
Defined Under Namespace
Classes: Link
Constant Summary collapse
- MalformedLinkHeader =
Class.new(StandardError)
Instance Attribute Summary collapse
-
#links ⇒ Object
Returns the value of attribute links.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(links) ⇒ LinkHeader
constructor
A new instance of LinkHeader.
- #to_s ⇒ Object
Constructor Details
#initialize(links) ⇒ LinkHeader
Returns a new instance of LinkHeader.
14 15 16 |
# File 'lib/tent-client/link_header.rb', line 14 def initialize(links) @links = Array(links) end |
Instance Attribute Details
#links ⇒ Object
Returns the value of attribute links.
6 7 8 |
# File 'lib/tent-client/link_header.rb', line 6 def links @links end |
Class Method Details
Instance Method Details
#to_s ⇒ Object
18 19 20 |
# File 'lib/tent-client/link_header.rb', line 18 def to_s links.map(&:to_s).join(', ') end |