Sha256: 6ca59cc5fcdae1249118c6f55dce54e7a7b8f85bbd958871324ea44296a78589

Contents?: true

Size: 548 Bytes

Versions: 34

Compression:

Stored size: 548 Bytes

Contents

module SamlIdp
  module Attributeable
    extend ActiveSupport::Concern

    def initialize(attributes = {})
      self.attributes = attributes
    end

    def attributes
      @attributes ||= {}.with_indifferent_access
    end

    def attributes=(new_attributes)
      @attributes = (new_attributes || {}).with_indifferent_access
    end

    module ClassMethods
      def attribute(att)
        define_method(att) { attributes[att] }
        define_method("#{att}=") { |new_value| self.attributes[att] = new_value }
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 2 rubygems

Version Path
saml_idp-0.16.0 lib/saml_idp/attributeable.rb
saml_idp-0.15.0 lib/saml_idp/attributeable.rb
saml_idp-0.14.0 lib/saml_idp/attributeable.rb
saml_idp-0.12.0 lib/saml_idp/attributeable.rb
saml_idp-0.11.0 lib/saml_idp/attributeable.rb
saml_idp-0.10.0 lib/saml_idp/attributeable.rb
saml_idp-0.9.0 lib/saml_idp/attributeable.rb
saml_idp-0.8.1 lib/saml_idp/attributeable.rb
saml_idp-0.8.0 lib/saml_idp/attributeable.rb
saml_idp-0.7.2 lib/saml_idp/attributeable.rb
saml_idp-0.7.1 lib/saml_idp/attributeable.rb
saml_idp-0.7.0 lib/saml_idp/attributeable.rb
saml_idp-0.6.0 lib/saml_idp/attributeable.rb
saml_idp-0.5.0 lib/saml_idp/attributeable.rb
icn_saml_idp-0.4.1 lib/saml_idp/attributeable.rb
saml_idp-0.4.0 lib/saml_idp/attributeable.rb
saml_idp-0.3.2 lib/saml_idp/attributeable.rb
saml_idp-0.3.1 lib/saml_idp/attributeable.rb
saml_idp-0.3.0 lib/saml_idp/attributeable.rb
saml_idp-0.2.1 lib/saml_idp/attributeable.rb