lib/danica/operator/chained.rb in danica-2.0.3 vs lib/danica/operator/chained.rb in danica-2.0.4

- old
+ new

@@ -3,10 +3,20 @@ class Chained < Operator def to_f chain(variables.map(&:to_f)) end + def include?(value) + value = wrap_value(value) + variables.include?(value) + end + private + + def repack(other) + other_variables = other.is_a?(self.class) ? other.variables : [ other ] + self.class.new(variables + other_variables) + end def tex_string (numeric_to_tex + non_numeric_variables.map(&:to_tex)).join(" #{tex_symbol} ") end