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
1046 1047 1048 |
# File 'lib/m500.rb', line 1046 def NaughtClass.new! new end |
Instance Method Details
#*(a) ⇒ Object
1069 1070 1071 |
# File 'lib/m500.rb', line 1069 def * (a) return self end |
#**(a) ⇒ Object
1075 1076 1077 |
# File 'lib/m500.rb', line 1075 def ** (a) 1 end |
#+(a) ⇒ Object
1063 1064 1065 |
# File 'lib/m500.rb', line 1063 def + (a) return a end |
#-(a) ⇒ Object
1066 1067 1068 |
# File 'lib/m500.rb', line 1066 def - (a) return a*(-1) end |
#/(a) ⇒ Object
1072 1073 1074 |
# File 'lib/m500.rb', line 1072 def / (a) nan end |
#<=>(other) ⇒ Object
1114 1115 1116 |
# File 'lib/m500.rb', line 1114 def <=>(other) 0 <=> other.to_i end |
#coerce(other) ⇒ Object
1117 1118 1119 |
# File 'lib/m500.rb', line 1117 def coerce(other) [other,0] end |
#div(a) ⇒ Object
1057 1058 1059 |
# File 'lib/m500.rb', line 1057 def div(a) 0 end |
#is_0? ⇒ Boolean
1060 1061 1062 |
# File 'lib/m500.rb', line 1060 def is_0? true end |
#next ⇒ Object
1108 1109 1110 |
# File 'lib/m500.rb', line 1108 def next 1 end |
#succ ⇒ Object
1111 1112 1113 |
# File 'lib/m500.rb', line 1111 def succ 1 end |
#to_Dec ⇒ Object
1102 1103 1104 |
# File 'lib/m500.rb', line 1102 def to_Dec "0.0".to_Dec end |
#to_f ⇒ Object
1081 1082 1083 |
# File 'lib/m500.rb', line 1081 def to_f 0.0 end |
#to_Frac ⇒ Object
1096 1097 1098 |
# File 'lib/m500.rb', line 1096 def to_Frac "0 0/1".to_Frac end |
#to_i ⇒ Object
1078 1079 1080 |
# File 'lib/m500.rb', line 1078 def to_i 0 end |
#to_N ⇒ Object
1090 1091 1092 |
# File 'lib/m500.rb', line 1090 def to_N emptySet end |
#to_Q ⇒ Object
1099 1100 1101 |
# File 'lib/m500.rb', line 1099 def to_Q Quotient(0,1) end |
#to_R ⇒ Object
1105 1106 1107 |
# File 'lib/m500.rb', line 1105 def to_R emptySet end |
#to_s ⇒ Object
1087 1088 1089 |
# File 'lib/m500.rb', line 1087 def to_s "0" end |
#to_s! ⇒ Object
1084 1085 1086 |
# File 'lib/m500.rb', line 1084 def to_s! "naught" end |
#to_sgml ⇒ Object
1054 1055 1056 |
# File 'lib/m500.rb', line 1054 def to_sgml "<mn #{sgml_id}class='naught'>0</mn>" end |
#to_Z ⇒ Object
1093 1094 1095 |
# File 'lib/m500.rb', line 1093 def to_Z Zahlen(0) end |