search: refactor PostQueryBuilder class methods into instance methods.
* Make scan_query, parse_query, normalize_query into instance methods instead of class methods. This is to a) clean up the API and b) prepare for moving certain tag utility methods into PostQueryBuilder. * Fix a few cases where a caller used scan_query when they should have used split_query or parse_tag_edit.
This commit is contained in:
@@ -88,8 +88,8 @@ class AliasAndImplicationImporter
|
||||
all
|
||||
|
||||
when :mass_update
|
||||
all += PostQueryBuilder.split_query(token[1])
|
||||
all += PostQueryBuilder.split_query(token[2])
|
||||
all += PostQueryBuilder.new(token[1]).split_query
|
||||
all += PostQueryBuilder.new(token[2]).parse_tag_edit
|
||||
all
|
||||
|
||||
when :change_category
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@ module PostSets
|
||||
attr_reader :tag_array, :page, :raw, :random, :post_count, :format
|
||||
|
||||
def initialize(tags, page = 1, per_page = nil, raw: false, random: false, format: "html")
|
||||
@tag_array = PostQueryBuilder.split_query(tags)
|
||||
@tag_array = PostQueryBuilder.new(tags).split_query
|
||||
@page = page
|
||||
@per_page = per_page
|
||||
@raw = raw.to_s.truthy?
|
||||
|
||||
Reference in New Issue
Block a user