Class: NBTFile::Types::Private::BaseScalar

Inherits:
Object
  • Object
show all
Includes:
Comparable, Base
Defined in:
lib/nbtfile.rb

Direct Known Subclasses

BaseFloat, BaseInteger

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



780
781
782
# File 'lib/nbtfile.rb', line 780

def value
  @value
end

Instance Method Details

#<=>(other) ⇒ Object



782
783
784
785
786
787
788
# File 'lib/nbtfile.rb', line 782

def <=>(other)
  if other.kind_of? BaseScalar
    @value <=> other.value
  else
    @value <=> other
  end
end