Class: Leftovers::Processors::SetPrivacy

Inherits:
Object
  • Object
show all
Includes:
ComparableInstance
Defined in:
lib/leftovers/processors/set_privacy.rb

Instance Method Summary collapse

Methods included from ComparableInstance

#eql?, #hash

Constructor Details

#initialize(to) ⇒ SetPrivacy

Returns a new instance of SetPrivacy.



8
9
10
11
12
# File 'lib/leftovers/processors/set_privacy.rb', line 8

def initialize(to)
  @to = to

  freeze
end

Instance Method Details

#process(str, _current_node, _matched_node, acc) ⇒ Object



14
15
16
17
18
# File 'lib/leftovers/processors/set_privacy.rb', line 14

def process(str, _current_node, _matched_node, acc)
  return unless str

  acc.set_privacy(str.to_sym, @to)
end