class Leftovers::ValueProcessors::Parameterize
Public Class Methods
new(then_processor)
click to toggle source
# File lib/leftovers/value_processors/parameterize.rb, line 6 def initialize(then_processor) @then_processor = then_processor freeze end
Public Instance Methods
process(str, node, method_node)
click to toggle source
# File lib/leftovers/value_processors/parameterize.rb, line 12 def process(str, node, method_node) return unless str @then_processor.process(str.parameterize, node, method_node) rescue NoMethodError Leftovers.error <<~MESSAGE Tried using the String#parameterize method, but the activesupport gem was not available and/or not required `gem install activesupport`, and/or add `requires: 'active_support/core_ext/string'` to your .leftovers.yml MESSAGE end