Class: SOAP::EncodingStyle::SOAPHandler::SOAPUnknown

Inherits:
SOAPTemporalObject show all
Defined in:
lib/soap/encodingstyle/soapHandler.rb

Instance Attribute Summary collapse

Attributes inherited from SOAPTemporalObject

#id, #parent, #position, #root

Instance Method Summary collapse

Constructor Details

#initialize(handler, elename, type, extraattr) ⇒ SOAPUnknown

Returns a new instance of SOAPUnknown.



103
104
105
106
107
108
109
110
# File 'lib/soap/encodingstyle/soapHandler.rb', line 103

def initialize(handler, elename, type, extraattr)
  super()
  @handler = handler
  @elename = elename
  @type = type
  @extraattr = extraattr
  @definedtype = nil
end

Instance Attribute Details

#definedtypeObject

Returns the value of attribute definedtype.



100
101
102
# File 'lib/soap/encodingstyle/soapHandler.rb', line 100

def definedtype
  @definedtype
end

#extraattrObject (readonly)

Returns the value of attribute extraattr.



101
102
103
# File 'lib/soap/encodingstyle/soapHandler.rb', line 101

def extraattr
  @extraattr
end

#typeObject (readonly)

Returns the value of attribute type.



99
100
101
# File 'lib/soap/encodingstyle/soapHandler.rb', line 99

def type
  @type
end

Instance Method Details

#as_nilObject



140
141
142
143
144
145
146
147
148
149
# File 'lib/soap/encodingstyle/soapHandler.rb', line 140

def as_nil
  o = SOAPNil.decode(@elename)
  o.id = @id
  o.root = @root
  o.parent = @parent
  o.position = @position
  o.extraattr.update(@extraattr)
  @handler.decode_parent(@parent, o)
  o
end

#as_stringObject



126
127
128
129
130
131
132
133
134
135
136
137
138
# File 'lib/soap/encodingstyle/soapHandler.rb', line 126

def as_string
  if @extraattr[XSD::AttrNilName] == 'true'
    return as_nil
  end
  o = SOAPString.decode(@elename)
  o.id = @id
  o.root = @root
  o.parent = @parent
  o.position = @position
  o.extraattr.update(@extraattr)
  @handler.decode_parent(@parent, o)
  o
end

#as_structObject



112
113
114
115
116
117
118
119
120
121
122
123
124
# File 'lib/soap/encodingstyle/soapHandler.rb', line 112

def as_struct
  if @extraattr[XSD::AttrNilName] == 'true'
    return as_nil
  end
  o = SOAPStruct.decode(@elename, @type)
  o.id = @id
  o.root = @root
  o.parent = @parent
  o.position = @position
  o.extraattr.update(@extraattr)
  @handler.decode_parent(@parent, o)
  o
end