class Faceter::Rules::MergeExcludes
Merges two consecutive nodes that exclude keys
@api private
Public Instance Methods
optimize()
click to toggle source
@private
# File lib/faceter/rules/merge_excludes.rb, line 21 def optimize Nodes::Exclude.new(selector: nodes.map(&:selector).reduce(:|)) end
optimize?()
click to toggle source
@private
# File lib/faceter/rules/merge_excludes.rb, line 16 def optimize? nodes.map { |node| node.instance_of? Nodes::Exclude }.reduce(:&) end