Class: WsdlMapper::Dom::Property
- Inherits:
-
Object
- Object
- WsdlMapper::Dom::Property
- Defined in:
- lib/wsdl_mapper/dom/property.rb
Defined Under Namespace
Classes: Ref
Instance Attribute Summary (collapse)
-
- (Object) bounds
readonly
Returns the value of attribute bounds.
-
- (Object) containing_type
Returns the value of attribute containing_type.
-
- (Object) default
readonly
Returns the value of attribute default.
-
- (Object) documentation
Returns the value of attribute documentation.
-
- (Object) fixed
readonly
Returns the value of attribute fixed.
-
- (Object) form
readonly
Returns the value of attribute form.
-
- (Object) name
readonly
Returns the value of attribute name.
-
- (Object) sequence
readonly
Returns the value of attribute sequence.
-
- (Object) type
Returns the value of attribute type.
-
- (Object) type_name
readonly
Returns the value of attribute type_name.
Instance Method Summary (collapse)
- - (Boolean) array?
- - (Boolean) default?
- - (Boolean) fixed?
-
- (Property) initialize(name, type_name, bounds: Bounds.new, sequence: 0, default: nil, fixed: nil, form: nil)
constructor
A new instance of Property.
- - (Boolean) optional?
- - (Boolean) required?
- - (Boolean) single?
Constructor Details
- (Property) initialize(name, type_name, bounds: Bounds.new, sequence: 0, default: nil, fixed: nil, form: nil)
Returns a new instance of Property
23 24 25 26 27 28 29 |
# File 'lib/wsdl_mapper/dom/property.rb', line 23 def initialize(name, type_name, bounds: Bounds.new, sequence: 0, default: nil, fixed: nil, form: nil) @name, @type_name, @bounds, @sequence = name, type_name, bounds, sequence @documentation = Documentation.new @default = default @fixed = fixed @form = form end |
Instance Attribute Details
- (Object) bounds (readonly)
Returns the value of attribute bounds
19 20 21 |
# File 'lib/wsdl_mapper/dom/property.rb', line 19 def bounds @bounds end |
- (Object) containing_type
Returns the value of attribute containing_type
20 21 22 |
# File 'lib/wsdl_mapper/dom/property.rb', line 20 def containing_type @containing_type end |
- (Object) default (readonly)
Returns the value of attribute default
19 20 21 |
# File 'lib/wsdl_mapper/dom/property.rb', line 19 def default @default end |
- (Object) documentation
Returns the value of attribute documentation
21 22 23 |
# File 'lib/wsdl_mapper/dom/property.rb', line 21 def documentation @documentation end |
- (Object) fixed (readonly)
Returns the value of attribute fixed
19 20 21 |
# File 'lib/wsdl_mapper/dom/property.rb', line 19 def fixed @fixed end |
- (Object) form (readonly)
Returns the value of attribute form
19 20 21 |
# File 'lib/wsdl_mapper/dom/property.rb', line 19 def form @form end |
- (Object) name (readonly)
Returns the value of attribute name
19 20 21 |
# File 'lib/wsdl_mapper/dom/property.rb', line 19 def name @name end |
- (Object) sequence (readonly)
Returns the value of attribute sequence
19 20 21 |
# File 'lib/wsdl_mapper/dom/property.rb', line 19 def sequence @sequence end |
- (Object) type
Returns the value of attribute type
20 21 22 |
# File 'lib/wsdl_mapper/dom/property.rb', line 20 def type @type end |
- (Object) type_name (readonly)
Returns the value of attribute type_name
19 20 21 |
# File 'lib/wsdl_mapper/dom/property.rb', line 19 def type_name @type_name end |
Instance Method Details
- (Boolean) array?
39 40 41 |
# File 'lib/wsdl_mapper/dom/property.rb', line 39 def array? @bounds.max.nil? end |
- (Boolean) default?
31 32 33 |
# File 'lib/wsdl_mapper/dom/property.rb', line 31 def default? !!@default end |
- (Boolean) fixed?
35 36 37 |
# File 'lib/wsdl_mapper/dom/property.rb', line 35 def fixed? !!@fixed end |
- (Boolean) optional?
47 48 49 |
# File 'lib/wsdl_mapper/dom/property.rb', line 47 def optional? @bounds.min == 0 && @bounds.max == 1 end |
- (Boolean) required?
51 52 53 |
# File 'lib/wsdl_mapper/dom/property.rb', line 51 def required? @bounds.min > 0 end |
- (Boolean) single?
43 44 45 |
# File 'lib/wsdl_mapper/dom/property.rb', line 43 def single? @bounds.min == 1 && @bounds.max == 1 end |