lib/strom/variable.rb in strom-0.0.1 vs lib/strom/variable.rb in strom-0.0.2
- old
+ new
@@ -1,5 +1,13 @@
class Variable < Struct.new(:value)
+ def to_s
+ "#{value} #{self.class.to_s.downcase}s"
+ end
+
+ def inspect
+ to_s
+ end
+
def and(other)
current = resistance = voltage = nil
[self, other].each do |element|
case element