Class: XSD::XSDAnySimpleType
Overview
The base class of XSD datatypes.
Constant Summary
- Type =
QName.new(Namespace, AnySimpleTypeLiteral)
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 (collapse)
- - (Object) data readonly
- - (Object) is_nil
Attributes inherited from NSDBase
Instance Method Summary (collapse)
-
- (Object) check_lexical_format(value)
true or raise.
-
- (XSDAnySimpleType) initialize(value = nil)
constructor
A new instance of XSDAnySimpleType.
-
- (Object) set(value)
set accepts a string which follows lexical space (ex. String: "+123"), or an object which follows canonical space (ex. Integer: 123).
-
- (Object) to_s
to_s creates a string which follows lexical space (ex. String: "123").
Methods inherited from NSDBase
Constructor Details
- (XSDAnySimpleType) initialize(value = nil)
A new instance of XSDAnySimpleType
122 123 124 |
# File 'lib/xsd/datatypes.rb', line 122 def initialize(value = nil) init(Type, value) end |
Instance Attribute Details
- (Object) data (readonly)
118 119 120 |
# File 'lib/xsd/datatypes.rb', line 118 def data @data end |
- (Object) is_nil
120 121 122 |
# File 'lib/xsd/datatypes.rb', line 120 def is_nil @is_nil end |
Instance Method Details
- (Object) check_lexical_format(value)
true or raise
127 128 129 130 |
# File 'lib/xsd/datatypes.rb', line 127 def check_lexical_format(value) screen_data(value) true end |
- (Object) set(value)
set accepts a string which follows lexical space (ex. String: "+123"), or an object which follows canonical space (ex. Integer: 123).
134 135 136 137 138 139 140 141 142 143 |
# File 'lib/xsd/datatypes.rb', line 134 def set(value) if value.nil? @is_nil = true @data = nil _set(nil) else @is_nil = false _set(screen_data(value)) end end |
- (Object) to_s
to_s creates a string which follows lexical space (ex. String: "123").
146 147 148 149 150 151 152 |
# File 'lib/xsd/datatypes.rb', line 146 def to_s() if @is_nil "" else _to_s end end |