Files

Class Index [+]

Quicksearch

XSD::XSDQName

Constants

Type

Public Class Methods

new(value = nil) click to toggle source
     # File lib/xsd/datatypes.rb, line 962
962:   def initialize(value = nil)
963:     init(Type, value)
964:   end

Private Instance Methods

_set(data) click to toggle source
     # File lib/xsd/datatypes.rb, line 978
978:   def _set(data)
979:     if data.nil?
980:       @prefix = @localpart = @data = nil
981:       return
982:     end
983:     @prefix, @localpart = data
984:     @data = _to_s
985:     @data.freeze
986:   end
_to_s() click to toggle source
     # File lib/xsd/datatypes.rb, line 988
988:   def _to_s
989:     if @prefix
990:       "#{ @prefix }:#{ @localpart }"
991:     else
992:       "#{ @localpart }"
993:     end
994:   end
screen_data(value) click to toggle source
     # File lib/xsd/datatypes.rb, line 968
968:   def screen_data(value)
969:     /^(?:([^:]+):)?([^:]+)$/ =~ value.to_s.strip
970:     unless Regexp.last_match
971:       raise ValueSpaceError.new("#{ type }: cannot accept '#{ value }'.")
972:     end
973:     prefix = $1
974:     localpart = $2
975:     [prefix, localpart]
976:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.