Method: Macrow#apply_all_rules

Defined in:
lib/macrow.rb

#apply_all_rules(str, object = nil) ⇒ Object Also known as: apply



56
57
58
59
60
61
62
63
64
65
66
# File 'lib/macrow.rb', line 56

def apply_all_rules(str, object = nil)
  return if str.nil? || !str.is_a?(String)

  dup_str = str.dup

  self.class.rule_words.each do |rule_word|
    apply_rule!(rule_word, dup_str, object)
  end

  dup_str
end