Class: XxxRename::Data::Config
- Defined in:
- lib/xxx_rename/data/config.rb
Instance Method Summary collapse
- #collection_tag_to_site_client ⇒ Object
- #mutex ⇒ Object
- #output_recorder ⇒ Object
- #prefix_hash ⇒ Object
- #scene_datastore ⇒ Object
Methods inherited from Base
Instance Method Details
#collection_tag_to_site_client ⇒ Object
66 67 68 69 70 71 72 |
# File 'lib/xxx_rename/data/config.rb', line 66 def collection_tag_to_site_client @collection_tag_to_site_client ||= {}.tap do |h| site.attributes.each_pair do |site_name, site_config| h[site_config.collection_tag] = site_name end end end |
#mutex ⇒ Object
74 75 76 |
# File 'lib/xxx_rename/data/config.rb', line 74 def mutex @mutex ||= Mutex.new end |
#output_recorder ⇒ Object
86 87 88 89 90 91 92 93 94 |
# File 'lib/xxx_rename/data/config.rb', line 86 def output_recorder @output_recorder ||= begin store = Data::OutputDatastore.new(generated_files_dir).store datastore = Data::FileRenameOpDatastore.new(store, mutex) datastore.migration_status = 0 datastore end end |
#prefix_hash ⇒ Object
56 57 58 59 60 61 62 63 64 |
# File 'lib/xxx_rename/data/config.rb', line 56 def prefix_hash { female_actors_prefix: global.female_actors_prefix, male_actors_prefix: global.male_actors_prefix, actors_prefix: global.actors_prefix, title_prefix: global.title_prefix, id_prefix: global.id_prefix } end |
#scene_datastore ⇒ Object
78 79 80 81 82 83 84 |
# File 'lib/xxx_rename/data/config.rb', line 78 def scene_datastore @scene_datastore ||= begin store = Data::SceneDatastore.new(File.join(generated_files_dir, "..")).store SceneDatastoreQuery.new(store, mutex) end end |