Class: WsdlMapper::Dom::Attribute
- Inherits:
-
Object
- Object
- WsdlMapper::Dom::Attribute
- Defined in:
- lib/wsdl_mapper/dom/attribute.rb
Defined Under Namespace
Classes: Ref
Instance Attribute Summary collapse
-
#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.
-
#type ⇒ Object
Returns the value of attribute type.
-
#type_name ⇒ Object
readonly
Returns the value of attribute type_name.
-
#use ⇒ Object
readonly
Returns the value of attribute use.
Instance Method Summary collapse
- #default? ⇒ Boolean
- #fixed? ⇒ Boolean
-
#initialize(name, type_name, default: nil, use: nil, fixed: nil, form: nil) ⇒ Attribute
constructor
A new instance of Attribute.
- #optional? ⇒ Boolean
- #required? ⇒ Boolean
Constructor Details
#initialize(name, type_name, default: nil, use: nil, fixed: nil, form: nil) ⇒ Attribute
Returns a new instance of Attribute.
16 17 18 19 20 21 22 23 |
# File 'lib/wsdl_mapper/dom/attribute.rb', line 16 def initialize(name, type_name, default: nil, use: nil, fixed: nil, form: nil) @name, @type_name = name, type_name @documentation = Documentation.new @default = default @use = use @fixed = fixed @form = form end |
Instance Attribute Details
#containing_type ⇒ Object
Returns the value of attribute containing_type.
14 15 16 |
# File 'lib/wsdl_mapper/dom/attribute.rb', line 14 def containing_type @containing_type end |
#default ⇒ Object (readonly)
Returns the value of attribute default.
11 12 13 |
# File 'lib/wsdl_mapper/dom/attribute.rb', line 11 def default @default end |
#documentation ⇒ Object
Returns the value of attribute documentation.
13 14 15 |
# File 'lib/wsdl_mapper/dom/attribute.rb', line 13 def documentation @documentation end |
#fixed ⇒ Object (readonly)
Returns the value of attribute fixed.
11 12 13 |
# File 'lib/wsdl_mapper/dom/attribute.rb', line 11 def fixed @fixed end |
#form ⇒ Object (readonly)
Returns the value of attribute form.
11 12 13 |
# File 'lib/wsdl_mapper/dom/attribute.rb', line 11 def form @form end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
11 12 13 |
# File 'lib/wsdl_mapper/dom/attribute.rb', line 11 def name @name end |
#type ⇒ Object
Returns the value of attribute type.
12 13 14 |
# File 'lib/wsdl_mapper/dom/attribute.rb', line 12 def type @type end |
#type_name ⇒ Object (readonly)
Returns the value of attribute type_name.
11 12 13 |
# File 'lib/wsdl_mapper/dom/attribute.rb', line 11 def type_name @type_name end |
#use ⇒ Object (readonly)
Returns the value of attribute use.
11 12 13 |
# File 'lib/wsdl_mapper/dom/attribute.rb', line 11 def use @use end |
Instance Method Details
#default? ⇒ Boolean
25 26 27 |
# File 'lib/wsdl_mapper/dom/attribute.rb', line 25 def default? !!@default end |
#fixed? ⇒ Boolean
29 30 31 |
# File 'lib/wsdl_mapper/dom/attribute.rb', line 29 def fixed? !!@fixed end |
#optional? ⇒ Boolean
33 34 35 |
# File 'lib/wsdl_mapper/dom/attribute.rb', line 33 def optional? @use == 'optional' end |
#required? ⇒ Boolean
37 38 39 |
# File 'lib/wsdl_mapper/dom/attribute.rb', line 37 def required? @use == 'required' end |