class WsdlMapper::Dom::Property

Attributes

bounds[R]
containing_type[RW]
default[R]
documentation[RW]
fixed[R]
form[R]
name[R]
sequence[R]
type[RW]
type_name[R]

Public Class Methods

new(name, type_name, bounds: Bounds.new, sequence: 0, default: nil, fixed: nil, form: nil) click to toggle source
# 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

Public Instance Methods

array?() click to toggle source
# File lib/wsdl_mapper/dom/property.rb, line 39
def array?
  @bounds.max.nil?
end
default?() click to toggle source
# File lib/wsdl_mapper/dom/property.rb, line 31
def default?
  !!@default
end
fixed?() click to toggle source
# File lib/wsdl_mapper/dom/property.rb, line 35
def fixed?
  !!@fixed
end
optional?() click to toggle source
# File lib/wsdl_mapper/dom/property.rb, line 47
def optional?
  @bounds.min == 0 && @bounds.max == 1
end
required?() click to toggle source
# File lib/wsdl_mapper/dom/property.rb, line 51
def required?
  @bounds.min > 0
end
single?() click to toggle source
# File lib/wsdl_mapper/dom/property.rb, line 43
def single?
  @bounds.min == 1 && @bounds.max == 1
end