Class: XSD::XSDBase64Binary
- Inherits:
-
XSDAnySimpleType
- Object
- NSDBase
- XSDAnySimpleType
- XSD::XSDBase64Binary
- Defined in:
- lib/xsd/datatypes.rb
Direct Known Subclasses
Constant Summary collapse
- Type =
QName.new(Namespace, Base64BinaryLiteral)
Constants included from XSD
AnySimpleTypeLiteral, AnySimpleTypeName, AnyTypeLiteral, AnyTypeName, AnyURILiteral, AttrNilName, AttrType, AttrTypeName, Base64BinaryLiteral, BooleanLiteral, ByteLiteral, DateLiteral, DateTimeLiteral, DecimalLiteral, DoubleLiteral, DurationLiteral, ENTITIESLiteral, ENTITYLiteral, FloatLiteral, GDayLiteral, GMonthDayLiteral, GMonthLiteral, GYearLiteral, GYearMonthLiteral, HexBinaryLiteral, IDLiteral, IDREFLiteral, IDREFSLiteral, InstanceNamespace, IntLiteral, IntegerLiteral, LanguageLiteral, LongLiteral, NCNameLiteral, NMTOKENLiteral, NMTOKENSLiteral, NameLiteral, Namespace, NegativeIntegerLiteral, NilLiteral, NilValue, NonNegativeIntegerLiteral, NonPositiveIntegerLiteral, NormalizedStringLiteral, PositiveIntegerLiteral, QNameLiteral, ShortLiteral, StringLiteral, TimeLiteral, TokenLiteral, UnsignedByteLiteral, UnsignedIntLiteral, UnsignedLongLiteral, UnsignedShortLiteral
Instance Attribute Summary
Attributes inherited from XSDAnySimpleType
Attributes inherited from NSDBase
Instance Method Summary collapse
-
#initialize(value = nil) ⇒ XSDBase64Binary
constructor
String in Ruby could be a binary.
- #set_encoded(value) ⇒ Object
- #string ⇒ Object
Methods inherited from XSDAnySimpleType
#check_lexical_format, #set, #to_s
Methods inherited from NSDBase
Constructor Details
#initialize(value = nil) ⇒ XSDBase64Binary
String in Ruby could be a binary.
918 919 920 |
# File 'lib/xsd/datatypes.rb', line 918 def initialize(value = nil) init(Type, value) end |
Instance Method Details
#set_encoded(value) ⇒ Object
922 923 924 925 926 927 928 |
# File 'lib/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 |
#string ⇒ Object
930 931 932 |
# File 'lib/xsd/datatypes.rb', line 930 def string @data.unpack("m")[0] end |