OSDN Git Service

fix READM.rdoc
authorTomohiro Nishimura <tomohiro68@gmail.com>
Thu, 28 Jan 2010 14:47:19 +0000 (23:47 +0900)
committerTomohiro Nishimura <tomohiro68@gmail.com>
Thu, 28 Jan 2010 14:47:19 +0000 (23:47 +0900)
README.rdoc

index 596f840..80bdc5b 100644 (file)
@@ -6,12 +6,23 @@ An utilities that is used by Mint.
 
 == Classes:
 
-=== Mint::Reader
-Read answer from user.
+== Mint::Expression
+This class represents an expression.
+
+  expression = Mint::Expression.new('5 div 4', expression_tree)
+  p expression.to_s #=> '5 div 4'
+  p expression.to_maxima #=> '5 / 4'
+  p expression.to_latex #=> '5 \div 4'
+  p expression.normalize #=> '5 div 4'
+
+=== Mint::Builder
+This class builds expression from string.
 
   input = Readline.readline('>')
   begine
-    answer = Mint::Reader.read(input)
+    answer = Mint::Builder.build(input)
+    p answer.class
+    #=> Mint::Expression
   rescue
     puts 'Please check your answer.'
   end
@@ -29,7 +40,7 @@ Problem generator.
 You must inheritance this class.
 and over wirte #generate_problem method.
 
-==== FourArithmetic
+==== FourArithmetic (Example)
 For four arithmetic operations.
 :rage option is required.
 
@@ -51,14 +62,9 @@ You must inheritance this class.
 to make original engine.
 and over write #solve method.
 
-===== FourArithmetic
+===== FourArithmetic (Example)
 Four arithmetic operations solver engine.
 
-== Mint::Expression
-This class represents an expression.
-
-  expression = Mint::Expression.new('5 div 4', :string => '5 / 4')
-  p expression.to_s #=> '5 div 4'
-  p expression.to_latex #=> '$$5 \divide 4$$'
-  p expression.normalize #=> '5 / 4'
+== TODO:
+Move description to code.