Module: LocalPersist

Defined in:
lib/rbbt/persist.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#local_persist_dirObject

Returns the value of attribute local_persist_dir.



514
515
516
# File 'lib/rbbt/persist.rb', line 514

def local_persist_dir
  @local_persist_dir
end

Class Method Details

.local_persist(name, type = nil, options = {}, persist_options = nil, &block) ⇒ Object



525
526
527
528
529
530
# File 'lib/rbbt/persist.rb', line 525

def self.local_persist(name, type = nil, options= {}, persist_options = nil, &block)
  persist_options ||= {}
  persist_options = {:dir => Rbbt.var.cache.persistence.find(:lib)}.merge persist_options
  persist_options[:other] = options
  Persist.persist(name, type, persist_options, &block)
end

Instance Method Details

#local_persist(name, type = nil, options = {}, persist_options = nil, &block) ⇒ Object



532
533
534
535
536
# File 'lib/rbbt/persist.rb', line 532

def local_persist(name, type = nil, options= {}, persist_options = nil, &block)
  persist_options ||= {}
  persist_options = {:dir => local_persist_dir}.merge persist_options
  self.local_persist(name, type, options, persist_options, &block)
end

#local_persist_tsv(source, name, opt = {}, options = {}, &block) ⇒ Object



538
539
540
# File 'lib/rbbt/persist.rb', line 538

def local_persist_tsv(source, name, opt = {}, options= {}, &block)
  Persist.persist_tsv(source, name, opt, options.merge({:dir => local_persist_dir, :persist => true}), &block)
end