Sha256: 9c7dc5562d592575a94d6fcc7f1c1ff49f3f74aa62e73548dcc156bd512cce94

Contents?: true

Size: 417 Bytes

Versions: 1

Compression:

Stored size: 417 Bytes

Contents

# frozen_string_literal: true

module XmlHasher
  module Configurable
    attr_writer :snakecase, :ignore_namespaces, :string_keys

    KEYS = %i[snakecase ignore_namespaces string_keys].freeze

    def configure
      yield self
      self
    end

    private

    def options
      XmlHasher::Configurable::KEYS.each_with_object({}) { |key, hash| hash[key] = instance_variable_get(:"@#{key}"); }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
xmlhasher-1.0.5 lib/xmlhasher/configurable.rb