Module: EPUB::Search
- Defined in:
- lib/epub/search.rb,
lib/epub/search/version.rb,
lib/epub/search/database.rb,
lib/epub/search/formatter/cli.rb,
lib/epub/search/database/actor.rb
Defined Under Namespace
Modules: Formatter Classes: Database
Constant Summary collapse
- DEFAULT_CONFIG =
{ :config_path => File.join(Dir.home, '.epub-search/config.yaml'), :dir => File.join(Dir.home, '.epub-search') }
- VERSION =
"0.0.6"
Class Method Summary collapse
Class Method Details
.config(config_file = nil) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/epub/search.rb', line 20 def config(config_file=nil) return @config if @config config_file = config_file || (File.file?('.epub-searchrc') ? '.epub-searchrc' : DEFAULT_CONFIG[:config_path]) conf = YAML.load_file(config_file) if File.file? config_file @config = DEFAULT_CONFIG.merge(conf || {}) end |