Sha256: 54a4889a7cd581615b135c2e7cfa3ae943e3647a5a090dba621efc6bf2b1f9fb

Contents?: true

Size: 836 Bytes

Versions: 1

Compression:

Stored size: 836 Bytes

Contents

module Sinatra
  module Soap
    class Wsdl

      @@actions = {}

      def self.actions
        @@actions
      end

      def self.register(name, *args, &block)
        @@actions = {} if @@actions.nil?
        @@actions[name] = {}
        args = args.pop
        unless args.nil?
          args.each do |key, value|
            @@actions[name][key] = value
          end
        end
        @@actions[name][:block] = block if block_given?
      end

      def self.generate
      end

      attr_accessor :action, :block, :arguments

      def initialize(action)
        data = all[action]
        raise Soap::Error, "Undefined Soap Action" if data.nil?
        @action = action
        @block = data[:block]
        @arguments = data.select {|k,v| k != :block}
      end

      def all
        @@actions
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sinatra-soap-0.1.7 lib/sinatra/soap/wsdl.rb