Class: QNum

Inherits:
QVal show all
Defined in:
lib/qtypes.rb

Overview

quark numbers

Instance Attribute Summary

Attributes inherited from QVal

#val

Instance Method Summary collapse

Methods inherited from QVal

#==, #initialize

Constructor Details

This class inherits a constructor from QVal

Instance Method Details

#qtypeObject



31
# File 'lib/qtypes.rb', line 31

def qtype; :Num end

#to_sObject



27
28
29
# File 'lib/qtypes.rb', line 27

def to_s
  @val.to_i == @val ? @val.to_i.to_s : @val.to_s
end