Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

root/branches/1_5/lib/wsdl/part.rb

Revision 1824, 0.9 kB (checked in by nahi, 1 year ago)
  • Copyright notice updated. add '2000-2007' uniformly.
  • Property svn:eol-style set to native
  • Property svn:keywords set to author date id revision
Line 
1 # WSDL4R - WSDL part definition.
2 # Copyright (C) 2000-2007  NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
4 # This program is copyrighted free software by NAKAMURA, Hiroshi.  You can
5 # redistribute it and/or modify it under the same terms of Ruby's license;
6 # either the dual license version in 2003, or any later version.
7
8
9 require 'wsdl/info'
10
11
12 module WSDL
13
14
15 class Part < Info
16   attr_reader :name     # required
17   attr_reader :element  # optional
18   attr_reader :type     # optional
19
20   def initialize
21     super
22     @name = nil
23     @element = nil
24     @type = nil
25   end
26
27   def parse_element(element)
28     case element
29     when DocumentationName
30       o = Documentation.new
31       o
32     else
33       nil
34     end
35   end
36
37   def parse_attr(attr, value)
38     case attr
39     when NameAttrName
40       @name = value.source
41     when ElementAttrName
42       @element = value
43     when TypeAttrName
44       @type = value
45     else
46       nil
47     end
48   end
49 end
50
51
52 end
Note: See TracBrowser for help on using the browser.