Class XSD::XSDBase64Binary
In: lib/xsd/datatypes.rb
Parent: XSDAnySimpleType

Methods

new   screen_data   set_encoded   string  

Constants

Type = QName.new(Namespace, Base64BinaryLiteral)

Public Class methods

String in Ruby could be a binary.

[Source]

     # File lib/xsd/datatypes.rb, line 903
903:   def initialize(value = nil)
904:     init(Type, value)
905:   end

Public Instance methods

[Source]

     # File lib/xsd/datatypes.rb, line 907
907:   def set_encoded(value)
908:     if /^[A-Za-z0-9+\/=]*$/ !~ value
909:       raise ValueSpaceError.new("#{ type }: cannot accept '#{ value }'.")
910:     end
911:     @data = String.new(value).strip
912:     @is_nil = false
913:   end

[Source]

     # File lib/xsd/datatypes.rb, line 915
915:   def string
916:     @data.unpack("m")[0]
917:   end

Private Instance methods

[Source]

     # File lib/xsd/datatypes.rb, line 921
921:   def screen_data(value)
922:     [value].pack("m").strip
923:   end

[Validate]