Module: Hearken::Paths

Included in:
Indexing::Indexer, Library
Defined in:
lib/hearken/paths.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#base_pathObject (readonly)

Returns the value of attribute base_path.



7
8
9
# File 'lib/hearken/paths.rb', line 7

def base_path
  @base_path
end

#index_pathObject (readonly)

Returns the value of attribute index_path.



7
8
9
# File 'lib/hearken/paths.rb', line 7

def index_path
  @index_path
end

Instance Method Details

#create_pathsObject



9
10
11
12
# File 'lib/hearken/paths.rb', line 9

def create_paths
  @base_path = ".hearken".from_home
  @index_path = ".hearken/music".from_home
end

#in_base_dir(&block) ⇒ Object



14
15
16
# File 'lib/hearken/paths.rb', line 14

def in_base_dir(&block)
  Dir.chdir(base_path, &block)
end