Module: LocalPersist

Defined in:
lib/rbbt/persist.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#local_persist_dirObject

Returns the value of attribute local_persist_dir.



445
446
447
# File 'lib/rbbt/persist.rb', line 445

def local_persist_dir
  @local_persist_dir
end

Instance Method Details

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



452
453
454
455
456
457
# File 'lib/rbbt/persist.rb', line 452

def local_persist(name, type = nil, options= {}, persist_options = nil, &block)
  persist_options ||= {}
  persist_options = {:dir => local_persist_dir}.merge persist_options
  persist_options[:other] = options
  Persist.persist(name, type, persist_options, &block)
end

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



459
460
461
# File 'lib/rbbt/persist.rb', line 459

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