Class: Deplate::LinkMap
- Inherits:
-
Object
- Object
- Deplate::LinkMap
- Defined in:
- lib/deplate/mod/linkmap.rb
Overview
Map by current_source_id (each source) of keys to link values
Class Method Summary collapse
- .get(current_source_id, label) ⇒ Object
- .links(current_source_id) ⇒ Object
- .set(current_source_id, label, href) ⇒ Object
Class Method Details
.get(current_source_id, label) ⇒ Object
38 39 40 |
# File 'lib/deplate/mod/linkmap.rb', line 38 def get(current_source_id, label) links(current_source_id)[label] || links(current_source_id)[:global] end |
.links(current_source_id) ⇒ Object
29 30 31 32 |
# File 'lib/deplate/mod/linkmap.rb', line 29 def links(current_source_id) @links ||= {} @links[current_source_id] ||= {} end |
.set(current_source_id, label, href) ⇒ Object
34 35 36 |
# File 'lib/deplate/mod/linkmap.rb', line 34 def set(current_source_id, label, href) links(current_source_id)[label] = href end |