class Nanoc::Core::OutdatednessStore

@api private

Public Class Methods

new(config:) click to toggle source
Calls superclass method Nanoc::Core::Store::new
# File lib/nanoc/core/outdatedness_store.rb, line 10
def initialize(config:)
  super(Nanoc::Core::Store.tmp_path_for(config: config, store_name: 'outdatedness'), 1)

  @outdated_refs = Set.new
end

Public Instance Methods

add(obj) click to toggle source
# File lib/nanoc/core/outdatedness_store.rb, line 22
def add(obj)
  @outdated_refs << obj.reference
  self
end
clear() click to toggle source
# File lib/nanoc/core/outdatedness_store.rb, line 39
def clear
  @outdated_refs = Set.new
  self
end
empty?() click to toggle source
# File lib/nanoc/core/outdatedness_store.rb, line 34
def empty?
  @outdated_refs.empty?
end
include?(obj) click to toggle source
# File lib/nanoc/core/outdatedness_store.rb, line 17
def include?(obj)
  @outdated_refs.include?(obj.reference)
end
remove(obj) click to toggle source
# File lib/nanoc/core/outdatedness_store.rb, line 28
def remove(obj)
  @outdated_refs.delete(obj.reference)
  self
end

Protected Instance Methods

data() click to toggle source
# File lib/nanoc/core/outdatedness_store.rb, line 46
def data
  @outdated_refs
end
data=(new_data) click to toggle source
# File lib/nanoc/core/outdatedness_store.rb, line 50
def data=(new_data)
  @outdated_refs = Set.new(new_data)
end