Class: Deplate::LinkMap

Inherits:
Object
  • Object
show all
Defined in:
lib/deplate/mod/linkmap.rb

Overview

Map by current_source_id (each source) of keys to link values

Class Method Summary collapse

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


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