Class: XSD::XSDDecimal

Inherits:
XSDAnySimpleType show all
Defined in:
lib/xsd/datatypes.rb

Direct Known Subclasses

SOAP::SOAPDecimal, XSDInteger

Constant Summary collapse

Type =
QName.new(Namespace, DecimalLiteral)

Constants included from XSD

AnySimpleTypeLiteral, AnySimpleTypeName, AnyTypeLiteral, AnyTypeName, AnyURILiteral, AttrNilName, AttrType, AttrTypeName, Base64BinaryLiteral, BooleanLiteral, ByteLiteral, DateLiteral, DateTimeLiteral, DecimalLiteral, DoubleLiteral, DurationLiteral, FloatLiteral, GDayLiteral, GMonthDayLiteral, GMonthLiteral, GYearLiteral, GYearMonthLiteral, HexBinaryLiteral, InstanceNamespace, IntLiteral, IntegerLiteral, LanguageLiteral, LongLiteral, Namespace, NegativeIntegerLiteral, NilLiteral, NilValue, NonNegativeIntegerLiteral, NonPositiveIntegerLiteral, NormalizedStringLiteral, PositiveIntegerLiteral, QNameLiteral, ShortLiteral, StringLiteral, TimeLiteral, TokenLiteral, UnsignedByteLiteral, UnsignedIntLiteral, UnsignedLongLiteral, UnsignedShortLiteral

Instance Attribute Summary

Attributes inherited from XSDAnySimpleType

#data, #is_nil

Attributes inherited from NSDBase

#type

Instance Method Summary collapse

Methods inherited from XSDAnySimpleType

#check_lexical_format, #set, #to_s

Methods inherited from NSDBase

inherited, #init, types

Constructor Details

#initialize(value = nil) ⇒ XSDDecimal

Returns a new instance of XSDDecimal.


245
246
247
# File 'lib/xsd/datatypes.rb', line 245

def initialize(value = nil)
  init(Type, value)
end

Instance Method Details

#nonzero?Boolean

Returns:

  • (Boolean)

249
250
251
# File 'lib/xsd/datatypes.rb', line 249

def nonzero?
  (@number != '0')
end