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
-
#bounds ⇒ Object
readonly
Returns the value of attribute bounds.
-
#containing_type ⇒ Object
Returns the value of attribute containing_type.
-
#default ⇒ Object
readonly
Returns the value of attribute default.
-
#documentation ⇒ Object
Returns the value of attribute documentation.
-
#fixed ⇒ Object
readonly
Returns the value of attribute fixed.
-
#form ⇒ Object
readonly
Returns the value of attribute form.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#sequence ⇒ Object
readonly
Returns the value of attribute sequence.
-
#type ⇒ Object
Returns the value of attribute type.
-
#type_name ⇒ Object
readonly
Returns the value of attribute type_name.
Instance Method Summary collapse
- #array? ⇒ Boolean
- #default? ⇒ Boolean
- #fixed? ⇒ Boolean
-
#initialize(name, type_name, bounds: Bounds.new, sequence: 0, default: nil, fixed: nil, form: nil) ⇒ Property
constructor
A new instance of Property.
- #optional? ⇒ Boolean
- #required? ⇒ Boolean
- #single? ⇒ Boolean
Constructor Details
#initialize(name, type_name, bounds: Bounds.new, sequence: 0, default: nil, fixed: nil, form: nil) ⇒ Property
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
#bounds ⇒ Object (readonly)
Returns the value of attribute bounds.
19 20 21 |
# File 'lib/wsdl_mapper/dom/property.rb', line 19 def bounds @bounds end |
#containing_type ⇒ Object
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 |
#default ⇒ Object (readonly)
Returns the value of attribute default.
19 20 21 |
# File 'lib/wsdl_mapper/dom/property.rb', line 19 def default @default end |
#documentation ⇒ Object
Returns the value of attribute documentation.
21 22 23 |
# File 'lib/wsdl_mapper/dom/property.rb', line 21 def documentation @documentation end |
#fixed ⇒ Object (readonly)
Returns the value of attribute fixed.
19 20 21 |
# File 'lib/wsdl_mapper/dom/property.rb', line 19 def fixed @fixed end |
#form ⇒ Object (readonly)
Returns the value of attribute form.
19 20 21 |
# File 'lib/wsdl_mapper/dom/property.rb', line 19 def form @form end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
19 20 21 |
# File 'lib/wsdl_mapper/dom/property.rb', line 19 def name @name end |
#sequence ⇒ Object (readonly)
Returns the value of attribute sequence.
19 20 21 |
# File 'lib/wsdl_mapper/dom/property.rb', line 19 def sequence @sequence end |
#type ⇒ Object
Returns the value of attribute type.
20 21 22 |
# File 'lib/wsdl_mapper/dom/property.rb', line 20 def type @type end |
#type_name ⇒ Object (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
#array? ⇒ Boolean
39 40 41 |
# File 'lib/wsdl_mapper/dom/property.rb', line 39 def array? @bounds.max.nil? end |
#default? ⇒ Boolean
31 32 33 |
# File 'lib/wsdl_mapper/dom/property.rb', line 31 def default? !!@default end |
#fixed? ⇒ Boolean
35 36 37 |
# File 'lib/wsdl_mapper/dom/property.rb', line 35 def fixed? !!@fixed end |
#optional? ⇒ Boolean
47 48 49 |
# File 'lib/wsdl_mapper/dom/property.rb', line 47 def optional? @bounds.min == 0 && @bounds.max == 1 end |
#required? ⇒ Boolean
51 52 53 |
# File 'lib/wsdl_mapper/dom/property.rb', line 51 def required? @bounds.min > 0 end |
#single? ⇒ Boolean
43 44 45 |
# File 'lib/wsdl_mapper/dom/property.rb', line 43 def single? @bounds.min == 1 && @bounds.max == 1 end |