Sha256: e7f258cfe245da1d3c49af087bf571cf25cec1ab6c06c99a2bcc7ea7ce3ebea8

Contents?: true

Size: 426 Bytes

Versions: 26

Compression:

Stored size: 426 Bytes

Contents

# frozen_string_literal: true

module Scim
  module Kit
    # Allows dynamic creation of attributes.
    module DynamicAttributes
      def method_missing(method, *args)
        return super unless respond_to_missing?(method)

        @dynamic_attributes[method] = args[0]
      end

      def respond_to_missing?(method, _include_private = false)
        @dynamic_attributes.key?(method) || super
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
scim-kit-0.7.1 lib/scim/kit/dynamic_attributes.rb
scim-kit-0.7.0 lib/scim/kit/dynamic_attributes.rb
scim-kit-0.6.0 lib/scim/kit/dynamic_attributes.rb
scim-kit-0.5.3 lib/scim/kit/dynamic_attributes.rb
scim-kit-0.5.2 lib/scim/kit/dynamic_attributes.rb
scim-kit-0.5.1 lib/scim/kit/dynamic_attributes.rb
scim-kit-0.5.0 lib/scim/kit/dynamic_attributes.rb
scim-kit-0.4.0 lib/scim/kit/dynamic_attributes.rb
scim-kit-0.3.2 lib/scim/kit/dynamic_attributes.rb
scim-kit-0.3.1 lib/scim/kit/dynamic_attributes.rb
scim-kit-0.3.0 lib/scim/kit/dynamic_attributes.rb
scim-kit-0.2.16 lib/scim/kit/dynamic_attributes.rb
scim-kit-0.2.15 lib/scim/kit/dynamic_attributes.rb
scim-kit-0.2.14 lib/scim/kit/dynamic_attributes.rb
scim-kit-0.2.13 lib/scim/kit/dynamic_attributes.rb
scim-kit-0.2.12 lib/scim/kit/dynamic_attributes.rb
scim-kit-0.2.11 lib/scim/kit/dynamic_attributes.rb
scim-kit-0.2.10 lib/scim/kit/dynamic_attributes.rb
scim-kit-0.2.9 lib/scim/kit/dynamic_attributes.rb
scim-kit-0.2.8 lib/scim/kit/dynamic_attributes.rb