Sha256: c03830a7434032b12267228f69584e83dc9b54bc47c8b7f2be159d9b5a271738

Contents?: true

Size: 359 Bytes

Versions: 1

Compression:

Stored size: 359 Bytes

Contents

# frozen_string_literal: true

module ProcessSip::Refinements
  refine(Symbol) { def dasherize = name.dasherize }
  refine(String) { def dasherize = tr("_", "-") }

  refine Object do
    def clone_with(**instance_variables)
      clone.tap do |object|
        instance_variables.each { object.instance_variable_set "@#{_1}", _2 }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
process_sip-0.1.0 lib/process_sip/refinements.rb