Module: Paste::Cache

Included in:
Glue
Defined in:
lib/paste/cache.rb

Instance Method Summary collapse

Instance Method Details

#parser(source) ⇒ Object



15
16
17
18
# File 'lib/paste/cache.rb', line 15

def parser source
  find_sources if @sources.nil?
  @sources[find(source)]
end

#rebuildObject



7
8
9
10
11
12
13
# File 'lib/paste/cache.rb', line 7

def rebuild
  find_sources

  @sources.reject!{ |_, parser| !File.exists? parser.file }

  @sources.values.each &:copy_if_needed
end