Class: NaughtClass
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
- #*(a) ⇒ Object
- #**(a) ⇒ Object
- #+(a) ⇒ Object
- #-(a) ⇒ Object
- #/(a) ⇒ Object
- #<=>(other) ⇒ Object
- #coerce(other) ⇒ Object
- #div(a) ⇒ Object
- #is_0? ⇒ Boolean
- #next ⇒ Object
- #succ ⇒ Object
- #to_Dec ⇒ Object
- #to_f ⇒ Object
- #to_Frac ⇒ Object
- #to_i ⇒ Object
- #to_N ⇒ Object
- #to_Q ⇒ Object
- #to_R ⇒ Object
- #to_s ⇒ Object
- #to_s! ⇒ Object
- #to_sgml ⇒ Object
- #to_Z ⇒ Object
Methods included from SGML
Class Method Details
.new! ⇒ Object
976 977 978 |
# File 'lib/m500.rb', line 976 def NaughtClass.new! new end |
Instance Method Details
#*(a) ⇒ Object
999 1000 1001 |
# File 'lib/m500.rb', line 999 def * (a) return self end |
#**(a) ⇒ Object
1005 1006 1007 |
# File 'lib/m500.rb', line 1005 def ** (a) 1 end |
#+(a) ⇒ Object
993 994 995 |
# File 'lib/m500.rb', line 993 def + (a) return a end |
#-(a) ⇒ Object
996 997 998 |
# File 'lib/m500.rb', line 996 def - (a) return a*(-1) end |
#/(a) ⇒ Object
1002 1003 1004 |
# File 'lib/m500.rb', line 1002 def / (a) nan end |
#<=>(other) ⇒ Object
1044 1045 1046 |
# File 'lib/m500.rb', line 1044 def <=>(other) 0 <=> other.to_i end |
#coerce(other) ⇒ Object
1047 1048 1049 |
# File 'lib/m500.rb', line 1047 def coerce(other) [other,0] end |
#div(a) ⇒ Object
987 988 989 |
# File 'lib/m500.rb', line 987 def div(a) 0 end |
#is_0? ⇒ Boolean
990 991 992 |
# File 'lib/m500.rb', line 990 def is_0? true end |
#next ⇒ Object
1038 1039 1040 |
# File 'lib/m500.rb', line 1038 def next 1 end |
#succ ⇒ Object
1041 1042 1043 |
# File 'lib/m500.rb', line 1041 def succ 1 end |
#to_Dec ⇒ Object
1032 1033 1034 |
# File 'lib/m500.rb', line 1032 def to_Dec "0.0".to_Dec end |
#to_f ⇒ Object
1011 1012 1013 |
# File 'lib/m500.rb', line 1011 def to_f 0.0 end |
#to_Frac ⇒ Object
1026 1027 1028 |
# File 'lib/m500.rb', line 1026 def to_Frac "0 0/1".to_Frac end |
#to_i ⇒ Object
1008 1009 1010 |
# File 'lib/m500.rb', line 1008 def to_i 0 end |
#to_N ⇒ Object
1020 1021 1022 |
# File 'lib/m500.rb', line 1020 def to_N emptySet end |
#to_Q ⇒ Object
1029 1030 1031 |
# File 'lib/m500.rb', line 1029 def to_Q Quotient(0,1) end |
#to_R ⇒ Object
1035 1036 1037 |
# File 'lib/m500.rb', line 1035 def to_R emptySet end |
#to_s ⇒ Object
1017 1018 1019 |
# File 'lib/m500.rb', line 1017 def to_s "0" end |
#to_s! ⇒ Object
1014 1015 1016 |
# File 'lib/m500.rb', line 1014 def to_s! "naught" end |
#to_sgml ⇒ Object
984 985 986 |
# File 'lib/m500.rb', line 984 def to_sgml "<mn #{sgml_id}class='naught'>0</mn>" end |
#to_Z ⇒ Object
1023 1024 1025 |
# File 'lib/m500.rb', line 1023 def to_Z Zahlen(0) end |