Class: Shaf::LinkRelations
- Inherits:
-
Object
- Object
- Shaf::LinkRelations
- Defined in:
- lib/shaf/link_relations.rb
Defined Under Namespace
Classes: LinkRelation
Constant Summary collapse
- IANA_URL =
URI('https://www.iana.org/assignments/link-relations/link-relations-1.csv')
Class Method Summary collapse
Class Method Details
.add(link_relation) ⇒ Object
33 34 35 |
# File 'lib/shaf/link_relations.rb', line 33 def add(link_relation) relations[link_relation.name.to_sym] = link_relation end |
.all ⇒ Object
24 25 26 |
# File 'lib/shaf/link_relations.rb', line 24 def all relations.values end |
.get(key) ⇒ Object
28 29 30 31 |
# File 'lib/shaf/link_relations.rb', line 28 def get(key) load_iana relations[key.to_sym] end |