Sha256: ca1c50ab85cbe828d329be478d553a0f4ea7c1f918c24407f1788a9cd002f577

Contents?: true

Size: 722 Bytes

Versions: 8

Compression:

Stored size: 722 Bytes

Contents

module WashOut
  class Type

    def self.type_name(value)
      @param_type_name = value.to_s
    end

    def self.map(value)
      raise RuntimeError, "Wrong definition: #{value.inspect}" unless value.is_a?(Hash)
      @param_map = value
    end

    def self.wash_out_param_map
      @param_map
    end

    def self.wash_out_param_name(soap_config = nil)
      soap_config ||= WashOut::SoapConfig.new({})
      @param_type_name ||= name.underscore.gsub '/', '.'

      if soap_config.camelize_wsdl.to_s == 'lower'
        @param_type_name = @param_type_name.camelize(:lower)
      elsif soap_config.camelize_wsdl
        @param_type_name = @param_type_name.camelize
      end
      @param_type_name
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
wash-out-0.10.1 lib/wash_out/type.rb
wash_out-0.12.0 lib/wash_out/type.rb
wash_out-0.11.0 lib/wash_out/type.rb
wash_out-0.11.0.beta.2 lib/wash_out/type.rb
wash_out-0.11.0.beta.1 lib/wash_out/type.rb
wash_out-0.10.0 lib/wash_out/type.rb
wash_out-0.9.2 lib/wash_out/type.rb
wash_out-0.9.0 lib/wash_out/type.rb