Class: XxxRename::SiteClients::QueryGenerator::NaughtyAmerica
- Extended by:
- Utils
- Defined in:
- lib/xxx_rename/site_clients/query_generator/naughty_america.rb
Constant Summary
Constants included from Utils
Instance Attribute Summary
Attributes inherited from Base
#filename, #processed_file_patterns, #source_pattern
Class Method Summary collapse
Methods included from Utils
adjust_apostrophe, api_error, handle_response!
Methods inherited from Base
generic_generate, #initialize, #parse
Constructor Details
This class inherits a constructor from XxxRename::SiteClients::QueryGenerator::Base
Class Method Details
.generate(filename, source_format) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/xxx_rename/site_clients/query_generator/naughty_america.rb', line 11 def self.generate(filename, source_format) if (data = new(filename, source_format, []).parse) SearchParameters.new(**data.to_h) else # Make sure to do this match to prevent unnecessary calls to API return unless filename.match? Constants::NAUGHTY_AMERICA_ORIGINAL_FILE_REGEX filename.match(Constants::NAUGHTY_AMERICA_ORIGINAL_FILE_REGEX)[:compressed_scene] end end |