Class: FlyingSphinx::SettingFiles
- Inherits:
-
Object
- Object
- FlyingSphinx::SettingFiles
- Defined in:
- lib/flying_sphinx/setting_files.rb
Constant Summary collapse
- INDEX_SETTINGS =
[:stopwords, :wordforms, :exceptions]
- SOURCE_SETTINGS =
[:mysql_ssl_cert, :mysql_ssl_key, :mysql_ssl_ca]
- COMMON_SETTINGS =
[:lemmatizer_base]
Instance Method Summary collapse
-
#initialize(configuration) ⇒ SettingFiles
constructor
A new instance of SettingFiles.
- #to_hash ⇒ Object
Constructor Details
#initialize(configuration) ⇒ SettingFiles
Returns a new instance of SettingFiles.
6 7 8 |
# File 'lib/flying_sphinx/setting_files.rb', line 6 def initialize(configuration) @configuration = configuration end |
Instance Method Details
#to_hash ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/flying_sphinx/setting_files.rb', line 10 def to_hash hash = {} each_file_for_setting do |setting, file| hash["#{setting}/#{File.basename(file)}"] = File.read(file) end hash['extra'] = hash.keys.join(';') hash end |