Sha256: f25d6367be947a5c703f77dac429b8bb6a6a687ec27cc861406334e979a63ab7

Contents?: true

Size: 456 Bytes

Versions: 7

Compression:

Stored size: 456 Bytes

Contents

module Saml
  module Kit
    module Buildable
      extend ActiveSupport::Concern

      class_methods do
        def build(*args, &block)
          builder(*args, &block).build
        end

        def build_xml(*args, &block)
          builder(*args, &block).to_xml
        end

        def builder(*args)
          builder_class.new(*args).tap do |builder|
            yield builder if block_given?
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
saml-kit-0.2.11 lib/saml/kit/buildable.rb
saml-kit-0.2.10 lib/saml/kit/buildable.rb
saml-kit-0.2.9 lib/saml/kit/buildable.rb
saml-kit-0.2.8 lib/saml/kit/buildable.rb
saml-kit-0.2.7 lib/saml/kit/buildable.rb
saml-kit-0.2.6 lib/saml/kit/buildable.rb
saml-kit-0.2.5 lib/saml/kit/buildable.rb