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:
@@ -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