Class: HttpHeaders::Link
- Inherits:
-
Array
- Object
- Array
- HttpHeaders::Link
- Defined in:
- lib/http_headers/link.rb,
lib/http_headers/link/version.rb
Overview
< DelegateClass(Array) defined by version
Defined Under Namespace
Classes: Entry
Constant Summary collapse
- VERSION =
'0.2.1'
Instance Method Summary collapse
- #[](name) ⇒ Object
- #indexed ⇒ Object
-
#initialize(value) ⇒ Link
constructor
A new instance of Link.
Constructor Details
#initialize(value) ⇒ Link
Returns a new instance of Link.
6 7 8 9 |
# File 'lib/http_headers/link.rb', line 6 def initialize(value) __setobj__ HttpHeaders::Utils::List.new(value, entry_klazz: Link::Entry) indexify! end |
Instance Method Details
#[](name) ⇒ Object
12 13 14 15 16 |
# File 'lib/http_headers/link.rb', line 12 def [](name) lookup.fetch(String(name).to_sym) do indexed(name) end end |
#indexed ⇒ Object
11 |
# File 'lib/http_headers/link.rb', line 11 alias_method :indexed, :[] |