Parent

Files

Class/Module Index [+]

Quicksearch

WSDL::XMLSchema::SimpleRestriction

Attributes

attributes[R]
base[R]
enumeration[R]
fixed[R]
fractiondigits[RW]
length[RW]
maxexlusive[RW]
maxinclusive[RW]
maxlength[RW]
minexlusive[RW]
mininclusive[RW]
minlength[RW]
pattern[RW]
totaldigits[RW]
whitespace[RW]

Public Class Methods

new() click to toggle source
# File lib/wsdl/xmlSchema/simpleRestriction.rb, line 34
def initialize
  super
  @base = nil
  @enumeration = []   # NamedElements?
  @length = nil
  @maxlength = nil
  @minlength = nil
  @pattern = nil
  @fixed = {}
  @attributes = XSD::NamedElements.new
end

Public Instance Methods

enumeration?() click to toggle source
# File lib/wsdl/xmlSchema/simpleRestriction.rb, line 55
def enumeration?
  !@enumeration.empty?
end
parse_attr(attr, value) click to toggle source
# File lib/wsdl/xmlSchema/simpleRestriction.rb, line 100
def parse_attr(attr, value)
  case attr
  when BaseAttrName
    @base = value
  end
end
parse_element(element) click to toggle source
# File lib/wsdl/xmlSchema/simpleRestriction.rb, line 59
def parse_element(element)
  case element
  when LengthName
    Length.new
  when MinLengthName
    MinLength.new
  when MaxLengthName
    MaxLength.new
  when PatternName
    Pattern.new
  when EnumerationName
    Enumeration.new
  when WhiteSpaceName
    WhiteSpace.new
  when MaxInclusiveName
    MaxInclusive.new
  when MaxExclusiveName
    MaxExlusive.new
  when MinExclusiveName
    MinExlusive.new
  when MinInclusiveName
    MinInclusive.new
  when TotalDigitsName
    TotalDigits.new
  when FractionDigitsName
    FractionDigits.new
  when AttributeName
    o = Attribute.new
    @attributes << o
    o
  when AttributeGroupName
    o = AttributeGroup.new
    @attributes << o
    o
  when AnyAttributeName
    o = AnyAttribute.new
    @attributes << o
    o
  end
end
valid?(value) click to toggle source
# File lib/wsdl/xmlSchema/simpleRestriction.rb, line 46
def valid?(value)
  return false unless check_restriction(value)
  return false unless check_length(value)
  return false unless check_maxlength(value)
  return false unless check_minlength(value)
  return false unless check_pattern(value)
  true
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.