class WSDL::XMLSchema::SimpleContent

Attributes

extension[R]
restriction[R]

Public Class Methods

new() click to toggle source
Calls superclass method WSDL::Info::new
# File lib/wsdl/xmlSchema/simpleContent.rb, line 26
def initialize
  super
  @restriction = nil
  @extension = nil
end

Public Instance Methods

attributes() click to toggle source
# File lib/wsdl/xmlSchema/simpleContent.rb, line 36
def attributes
  content.attributes
end
base() click to toggle source
# File lib/wsdl/xmlSchema/simpleContent.rb, line 32
def base
  content.base
end
check_lexical_format(value) click to toggle source
# File lib/wsdl/xmlSchema/simpleContent.rb, line 22
def check_lexical_format(value)
  check(value)
end
parse_element(element) click to toggle source
# File lib/wsdl/xmlSchema/simpleContent.rb, line 44
def parse_element(element)
  case element
  when RestrictionName
    @restriction = SimpleRestriction.new
    @restriction
  when ExtensionName
    @extension = SimpleExtension.new
    @extension
  end
end
targetnamespace() click to toggle source
# File lib/wsdl/xmlSchema/simpleContent.rb, line 40
def targetnamespace
  parent.targetnamespace
end

Private Instance Methods

check(value) click to toggle source
# File lib/wsdl/xmlSchema/simpleContent.rb, line 61
def check(value)
  unless content.valid?(value)
    raise XSD::ValueSpaceError.new("#{@name}: cannot accept '#{value}'")
  end
end
content() click to toggle source
# File lib/wsdl/xmlSchema/simpleContent.rb, line 57
def content
  @restriction || @extension
end