Sha256: 1e129c543466bae52c902fad4a7587c5da0733929c3a7da869a04f60f47257f4

Contents?: true

Size: 657 Bytes

Versions: 3

Compression:

Stored size: 657 Bytes

Contents

class LolSoap::WSDL
  class Type
    attr_reader :name, :namespace

    def initialize(wsdl, name, namespace, elements)
      @wsdl      = wsdl
      @name      = name
      @namespace = namespace
      @elements  = elements
    end

    def elements
      @elements.dup
    end

    def element(name)
      @elements.fetch(name) { NullElement.new }
    end

    def sub_type(name)
      element(name).type
    end

    def prefix
      wsdl.prefixes[namespace]
    end

    def inspect
      "<#{self.class} " \
      "name=#{(prefix + ':' + name).inspect} " \
      "elements=#{elements.inspect}>"
    end

    private

    def wsdl; @wsdl; end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lolsoap-0.1.4 lib/lolsoap/wsdl/type.rb
lolsoap-0.1.3 lib/lolsoap/wsdl/type.rb
lolsoap-0.1.2 lib/lolsoap/wsdl/type.rb