Added the Gruff library to the lib/ directory of the the rails folder, and the
[selectricity-live] / lib / gruff-0.2.8 / lib / gruff / deprecated.rb
diff --git a/lib/gruff-0.2.8/lib/gruff/deprecated.rb b/lib/gruff-0.2.8/lib/gruff/deprecated.rb
new file mode 100644 (file)
index 0000000..be254b5
--- /dev/null
@@ -0,0 +1,39 @@
+
+##
+# A mixin for methods that need to be deleted or have been
+# replaced by cleaner code.
+
+module Gruff
+  module Deprecated
+  
+    def scale_measurements
+      setup_graph_measurements
+    end
+    
+    def total_height
+      @rows + 10
+    end
+    
+    def graph_top
+      @graph_top * @scale
+    end
+    
+    def graph_height
+      @graph_height * @scale
+    end
+    
+    def graph_left 
+      @graph_left * @scale 
+    end
+    
+    def graph_width
+      @graph_width * @scale
+    end
+    
+    # TODO Should be calculate_graph_height
+    # def setup_graph_height
+    #   @graph_height = @graph_bottom - @graph_top
+    # end
+  
+  end
+end

Benjamin Mako Hill || Want to submit a patch?