module FlightConfig::Indexable::ClassMethods

Public Instance Methods

create_or_update(*a) click to toggle source
# File lib/flight_config/indexable.rb, line 52
def create_or_update(*a)
  new!(*a, read_mode: true) do |index|
    Core.log(index, "Generating index")
    FileUtils.mkdir_p File.dirname(index.path)
    FileUtils.touch index.path
  end
end
glob_read(*a) click to toggle source
# File lib/flight_config/indexable.rb, line 44
def glob_read(*a)
  super.reject do |index|
    next if index.valid?
    FileUtils.rm_f index.path
    true
  end
end