XSD::NSDBase
Convenience datatypes.
# File soap/baseData.rb, line 156
def self.create_refid(obj)
'id' + obj.__id__.to_s
end
# File soap/baseData.rb, line 160
def self.decode(elename, refidstr)
if /\A#(.*)\z/ =~ refidstr
refid = $1
elsif /\Acid:(.*)\z/ =~ refidstr
refid = $1
else
raise ArgumentError.new("illegal refid #{refidstr}")
end
d = super(elename)
d.refid = refid
d
end
Override the definition in SOAPBasetype.
# File soap/baseData.rb, line 115
def initialize(obj = nil)
super()
@type = XSD::QName::EMPTY
@refid = nil
@obj = nil
__setobj__(obj) if obj
end
# File soap/baseData.rb, line 127
def __setobj__(obj)
@obj = obj
@refid = @obj.id || SOAPReference.create_refid(@obj)
@obj.id = @refid unless @obj.id
@obj.precedents << self
# Copies NSDBase information
@obj.type = @type unless @obj.type
end
Why don’t I use delegate.rb? -> delegate requires target object type at initialize time. Why don’t I use forwardable.rb? -> forwardable requires a list of forwarding methods.
ToDo: Maybe I should use forwardable.rb and give it a methods list like delegate.rb…
# File soap/baseData.rb, line 144
def method_missing(msg_id, *params)
if @obj
@obj.send(msg_id, *params)
else
nil
end
end
Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.
If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.
If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.
If you want to help improve the Ruby documentation, please see Improve the docs, or visit Documenting-ruby.org.