Class: WsdlMapper::Dom::Attribute

Inherits:
Object
  • Object
show all
Defined in:
lib/wsdl_mapper/dom/attribute.rb

Defined Under Namespace

Classes: Ref

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Attribute) initialize(name, type_name, default: nil, use: nil, fixed: nil, form: nil)

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

- (Object) containing_type

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

- (Object) default (readonly)

Returns the value of attribute default



11
12
13
# File 'lib/wsdl_mapper/dom/attribute.rb', line 11

def default
  @default
end

- (Object) documentation

Returns the value of attribute documentation



13
14
15
# File 'lib/wsdl_mapper/dom/attribute.rb', line 13

def documentation
  @documentation
end

- (Object) fixed (readonly)

Returns the value of attribute fixed



11
12
13
# File 'lib/wsdl_mapper/dom/attribute.rb', line 11

def fixed
  @fixed
end

- (Object) form (readonly)

Returns the value of attribute form



11
12
13
# File 'lib/wsdl_mapper/dom/attribute.rb', line 11

def form
  @form
end

- (Object) name (readonly)

Returns the value of attribute name



11
12
13
# File 'lib/wsdl_mapper/dom/attribute.rb', line 11

def name
  @name
end

- (Object) type

Returns the value of attribute type



12
13
14
# File 'lib/wsdl_mapper/dom/attribute.rb', line 12

def type
  @type
end

- (Object) type_name (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

- (Object) use (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

- (Boolean) default?

Returns:

  • (Boolean)


25
26
27
# File 'lib/wsdl_mapper/dom/attribute.rb', line 25

def default?
  !!@default
end

- (Boolean) fixed?

Returns:

  • (Boolean)


29
30
31
# File 'lib/wsdl_mapper/dom/attribute.rb', line 29

def fixed?
  !!@fixed
end

- (Boolean) optional?

Returns:

  • (Boolean)


33
34
35
# File 'lib/wsdl_mapper/dom/attribute.rb', line 33

def optional?
  @use == 'optional'
end

- (Boolean) required?

Returns:

  • (Boolean)


37
38
39
# File 'lib/wsdl_mapper/dom/attribute.rb', line 37

def required?
  @use == 'required'
end