class ActiveSupport::Duration::Scalar
def calculate(op, other)
def calculate(op, other) if Scalar === other Scalar.new(value.public_send(op, other.value)) elsif Numeric === other Scalar.new(value.public_send(op, other)) else raise_type_error(other) end end