Sha256: 51808c64aba79f298838147d5d98fe41161ee1e6b5fde7558da1b43ecb74797f

Contents?: true

Size: 352 Bytes

Versions: 1

Compression:

Stored size: 352 Bytes

Contents

module Redwood

class LabelSearchResultsMode < ThreadIndexMode
  def initialize labels
    @labels = labels
    opts = { :labels => @labels }
    opts[:load_deleted] = true if labels.include? :deleted
    opts[:load_spam] = true if labels.include? :spam
    super [], opts
  end

  def is_relevant? m; @labels.all? { |l| m.has_label? l }; end
end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sup-0.2 lib/sup/modes/label-search-results-mode.rb