Sha256: 202a88cd4ba3fda8bec57376b086040f5d392ab8f3d934928792e4f212333982

Contents?: true

Size: 663 Bytes

Versions: 2

Compression:

Stored size: 663 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
      "<LolSoap::WSDL::Type " \
      "name=#{(prefix + ':' + name).inspect} " \
      "elements=#{elements.inspect}>"
    end

    private

    def wsdl; @wsdl; end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lolsoap-0.1.1 lib/lolsoap/wsdl/type.rb
lolsoap-0.1.0 lib/lolsoap/wsdl/type.rb