XSD::XSDBase64Binary (Class)

In: xsd/datatypes.rb
Parent: XSDAnySimpleType

Methods

new   set_encoded   string  

Constants

Type = QName.new(Namespace, Base64BinaryLiteral)

Public Class methods

String in Ruby could be a binary.

[Source]

# File xsd/datatypes.rb, line 916
  def initialize(value = nil)
    super()
    @type = Type
    set(value) if value
  end

Public Instance methods

[Source]

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

[Source]

# File xsd/datatypes.rb, line 930
  def string
    @data.unpack("m")[0]
  end

[Validate]