Extended maintenance of Ruby versions 1.8.7 and 1.9.2 ended on July 31, 2014. Read more

In Files

  • xsd/datatypes.rb

Class/Module Index [+]

Quicksearch

XSD::XSDHexBinary

Constants

Type

Public Class Methods

new(value = nil) click to toggle source

String in Ruby could be a binary.

 
               # File xsd/datatypes.rb, line 876
def initialize(value = nil)
  init(Type, value)
end
            

Public Instance Methods

set_encoded(value) click to toggle source
 
               # File xsd/datatypes.rb, line 880
def set_encoded(value)
  if /^[0-9a-fA-F]*$/ !~ value
    raise ValueSpaceError.new("#{ type }: cannot accept '#{ value }'.")
  end
  @data = String.new(value).strip
  @is_nil = false
end
            
string() click to toggle source
 
               # File xsd/datatypes.rb, line 888
def string
  [@data].pack("H*")
end